mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-26 15:02:03 +00:00
Fix issue #2833 with backslash in JSON
Backslash will be removed form JSON responses for each request and for the initial configuration request
This commit is contained in:
parent
72235a5f72
commit
d8bd45c2bd
3
acme.sh
3
acme.sh
@ -2086,7 +2086,7 @@ _send_signed_request() {
|
|||||||
|
|
||||||
_debug2 original "$response"
|
_debug2 original "$response"
|
||||||
if echo "$responseHeaders" | grep -i "Content-Type: *application/json" >/dev/null 2>&1; then
|
if echo "$responseHeaders" | grep -i "Content-Type: *application/json" >/dev/null 2>&1; then
|
||||||
response="$(echo "$response" | _normalizeJson)"
|
response="$(echo "$response" | _normalizeJson | _json_decode)"
|
||||||
fi
|
fi
|
||||||
_debug2 response "$response"
|
_debug2 response "$response"
|
||||||
|
|
||||||
@ -2503,6 +2503,7 @@ _initAPI() {
|
|||||||
_err "Can not init api."
|
_err "Can not init api."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
response=$(echo "$response" | _json_decode)
|
||||||
_debug2 "response" "$response"
|
_debug2 "response" "$response"
|
||||||
|
|
||||||
ACME_KEY_CHANGE=$(echo "$response" | _egrep_o 'key-change" *: *"[^"]*"' | cut -d '"' -f 3)
|
ACME_KEY_CHANGE=$(echo "$response" | _egrep_o 'key-change" *: *"[^"]*"' | cut -d '"' -f 3)
|
||||||
|
Loading…
Reference in New Issue
Block a user