Skip to content

Commit 93d2c9a

Browse files
authored
Merge pull request #5207 from scruel/patch-5
fix(deploy): respect api path with synology Auth API
2 parents d81fc15 + 60569fd commit 93d2c9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deploy/synology_dsm.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ synology_dsm_deploy() {
169169
_debug3 H1 "${_H1}"
170170
fi
171171

172-
response=$(_post "method=login&account=$encoded_username&passwd=$encoded_password&api=SYNO.API.Auth&version=$api_version&enable_syno_token=yes&otp_code=$DEPRECATED_otp_code&device_name=certrenewal&device_id=$SYNO_DEVICE_ID" "$_base_url/webapi/auth.cgi?enable_syno_token=yes")
172+
response=$(_post "method=login&account=$encoded_username&passwd=$encoded_password&api=SYNO.API.Auth&version=$api_version&enable_syno_token=yes&otp_code=$DEPRECATED_otp_code&device_name=certrenewal&device_id=$SYNO_DEVICE_ID" "$_base_url/webapi/$api_path?enable_syno_token=yes")
173173
_debug3 response "$response"
174174
# ## END ## - DEPRECATED, for backward compatibility
175175
# If SYNO_DEVICE_ID or SYNO_OTP_CODE is set, we treat current account enabled 2FA-OTP.
@@ -218,7 +218,7 @@ synology_dsm_deploy() {
218218
otp_enforce_option=""
219219
fi
220220
fi
221-
response=$(_get "$_base_url/webapi/entry.cgi?api=SYNO.API.Auth&version=$api_version&method=login&format=sid&account=$encoded_username&passwd=$encoded_password&enable_syno_token=yes")
221+
response=$(_get "$_base_url/webapi/$api_path?api=SYNO.API.Auth&version=$api_version&method=login&format=sid&account=$encoded_username&passwd=$encoded_password&enable_syno_token=yes")
222222
if [ -n "$SYNO_USE_TEMP_ADMIN" ] && [ -n "$otp_enforce_option" ]; then
223223
synosetkeyvalue /etc/synoinfo.conf otp_enforce_option "$otp_enforce_option"
224224
_info "Restored previous enforce 2FA-OTP option."

0 commit comments

Comments
 (0)