Skip to content

Commit

Permalink
need to _url_encode anything sent in GET requests
Browse files Browse the repository at this point in the history
Fixes issue raised by @tatablack
  • Loading branch information
tresni committed May 16, 2020
1 parent b18ce5a commit 52b8160
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deploy/synology_dsm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ synology_dsm_deploy() {
_info "Logging into $SYNO_Hostname:$SYNO_Port"
response=$(_get "$_base_url/webman/login.cgi?username=$SYNO_Username&passwd=$SYNO_Password&enable_syno_token=yes&device_id=$SYNO_DID")
token=$(echo "$response" | grep "SynoToken" | sed -n 's/.*"SynoToken" *: *"\([^"]*\).*/\1/p')
encoded_username="$(printf "%s" "$SYNO_Username" | _url_encode)"
encoded_password="$(printf "%s" "$SYNO_Password" | _url_encode)"
encoded_did="$(printf "%s" "$SYNO_DID" | _url_encode)"
_debug3 response "$response"

if [ -z "$token" ]; then
Expand Down

0 comments on commit 52b8160

Please sign in to comment.