Skip to content

Commit 3d8b682

Browse files
authored
Merge pull request #6380 from schlegel11/master
Cloudns provider: Fix missing api password encoding
2 parents 7b76502 + 28687ad commit 3d8b682

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dnsapi/dns_cloudns.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,11 @@ _dns_cloudns_http_api_call() {
197197
auth_user="auth-id=$CLOUDNS_AUTH_ID"
198198
fi
199199

200+
encoded_password=$(echo "$CLOUDNS_AUTH_PASSWORD" | tr -d "\n\r" | _url_encode)
200201
if [ -z "$2" ]; then
201-
data="$auth_user&auth-password=$CLOUDNS_AUTH_PASSWORD"
202+
data="$auth_user&auth-password=$encoded_password"
202203
else
203-
data="$auth_user&auth-password=$CLOUDNS_AUTH_PASSWORD&$2"
204+
data="$auth_user&auth-password=$encoded_password&$2"
204205
fi
205206

206207
response="$(_get "$CLOUDNS_API/$method?$data")"

0 commit comments

Comments
 (0)