mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-10-31 19:41:45 +00:00
un-escape json chars
fix https://github.com/acmesh-official/acme.sh/issues/2833
This commit is contained in:
parent
5ace44493a
commit
93de1e4903
10
acme.sh
10
acme.sh
@ -846,6 +846,14 @@ _json_encode() {
|
|||||||
echo "$_j_str" | _hex_dump | _lower_case | sed 's/0a/5c 6e/g' | tr -d ' ' | _h2b | tr -d "\r\n"
|
echo "$_j_str" | _hex_dump | _lower_case | sed 's/0a/5c 6e/g' | tr -d ' ' | _h2b | tr -d "\r\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#from: http:\/\/ to http://
|
||||||
|
_json_decode() {
|
||||||
|
_j_str="$(sed 's#\\/#/#g')"
|
||||||
|
_debug3 "_json_decode"
|
||||||
|
_debug3 "_j_str" "$_j_str"
|
||||||
|
echo "$_j_str"
|
||||||
|
}
|
||||||
|
|
||||||
#options file
|
#options file
|
||||||
_sed_i() {
|
_sed_i() {
|
||||||
options="$1"
|
options="$1"
|
||||||
@ -4019,7 +4027,7 @@ issue() {
|
|||||||
#for dns manual mode
|
#for dns manual mode
|
||||||
_savedomainconf "Le_OrderFinalize" "$Le_OrderFinalize"
|
_savedomainconf "Le_OrderFinalize" "$Le_OrderFinalize"
|
||||||
|
|
||||||
_authorizations_seg="$(echo "$response" | _egrep_o '"authorizations" *: *\[[^\[]*\]' | cut -d '[' -f 2 | tr -d ']' | tr -d '"')"
|
_authorizations_seg="$(echo "$response" | _json_decode | _egrep_o '"authorizations" *: *\[[^\[]*\]' | cut -d '[' -f 2 | tr -d ']' | tr -d '"')"
|
||||||
_debug2 _authorizations_seg "$_authorizations_seg"
|
_debug2 _authorizations_seg "$_authorizations_seg"
|
||||||
if [ -z "$_authorizations_seg" ]; then
|
if [ -z "$_authorizations_seg" ]; then
|
||||||
_err "_authorizations_seg not found."
|
_err "_authorizations_seg not found."
|
||||||
|
Loading…
Reference in New Issue
Block a user