Merge branch 'szepeviktor-patch-2'

* szepeviktor-patch-2:
  Handle passwords with space in it
This commit is contained in:
Pascal Obry
2015-04-06 17:55:52 +02:00
+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}"