Skip to content
Extraits de code Groupes Projets
Valider 71fa0aa8 rédigé par Miryuni's avatar Miryuni
Parcourir les fichiers

Message d'erreur plus explicite

parent f246322f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -53,13 +53,13 @@ curl "https://$homeserver" -I -o headers -s ...@@ -53,13 +53,13 @@ curl "https://$homeserver" -I -o headers -s
if test -f "headers"; then if test -f "headers"; then
rm headers rm headers
else else
echo 1>&2 "$0:FATAL: The homeserver \"$2\" is not correct." echo 1>&2 "$0:FATAL: The homeserver \"$2\" is incorrect."
exit 1 exit 1
fi fi
# Checking if the token exist. # Checking if the token exist.
# Save the error value on file "headers" and # Save the error value on file "headers" and
# compare the error to verify the token # evaluate it to verify the token
curl -s -X POST "https://$homeserver/_matrix/media/r0/upload?access_token=$token" | python3 -c "import sys, json; print(json.load(sys.stdin)['errcode'])" >> headers curl -s -X POST "https://$homeserver/_matrix/media/r0/upload?access_token=$token" | python3 -c "import sys, json; print(json.load(sys.stdin)['errcode'])" >> headers
while read line; do while read line; do
if [[ ($line == "M_UNKNOWN") ]] if [[ ($line == "M_UNKNOWN") ]]
...@@ -67,7 +67,7 @@ while read line; do ...@@ -67,7 +67,7 @@ while read line; do
rm headers rm headers
else if [[ ($line == "M_UNKNOWN_TOKEN") ]] else if [[ ($line == "M_UNKNOWN_TOKEN") ]]
then then
echo "$0:ERROR: The token provided does not exist" echo "$0:ERROR: The token provided is incorrect or does not exist in this homeserver"
rm headers rm headers
exit 1 exit 1
else else
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter