Handle passwords with space in it

This commit is contained in:
Viktor Szépe
2015-04-06 17:55:01 +02:00
committed by Pascal Obry
parent 6e96641788
commit b564d311ef
+2 -2
View File
@@ -250,7 +250,7 @@ error()
urlenc()
{
echo $1 | sed -e 's|%|%21|g' \
echo "$1" | sed -e 's|%|%21|g' \
-e 's|!|%21|g' \
-e 's|#|%23|g' \
-e 's|\$|%24|g' \
@@ -496,7 +496,7 @@ out="$(
stty echo 2>/dev/null
fi
printf '\n' >&2
POST="$( printf '%s' "${scope}" | sed 's|,|\&|g;s|\.|=|g' )&oauth=${oauth}&action=accepted&login=${user_login}&user_pwd=$(urlenc ${user_pwd})"
POST="$( printf '%s' "${scope}" | sed 's|,|\&|g;s|\.|=|g' )&oauth=${oauth}&action=accepted&login=${user_login}&user_pwd=$(urlenc "${user_pwd}")"
ccurl "${URL_AUTH}/auth/" "${CURL_DATA}" "${POST}"