Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
52b81608
Unverified
Commit
52b81608
authored
May 15, 2020
by
Brian Hartvigsen
Browse files
need to _url_encode anything sent in GET requests
Fixes issue raised by @tatablack
parent
b18ce5ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
deploy/synology_dsm.sh
View file @
52b81608
...
@@ -83,6 +83,9 @@ synology_dsm_deploy() {
...
@@ -83,6 +83,9 @@ synology_dsm_deploy() {
_info
"Logging into
$SYNO_Hostname
:
$SYNO_Port
"
_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
"
)
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'
)
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
"
_debug3 response
"
$response
"
if
[
-z
"
$token
"
]
;
then
if
[
-z
"
$token
"
]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment