mirror of
https://github.com/acmesh-official/acme.sh
synced 2025-09-01 14:55:26 +00:00
Merge pull request #5008 from cjwalsh/patch-1
Fix for empty error objects in response breaking extraction of domain validation types
This commit is contained in:
6
acme.sh
6
acme.sh
@@ -4762,7 +4762,8 @@ $_authorizations_map"
|
|||||||
_debug keyauthorization "$keyauthorization"
|
_debug keyauthorization "$keyauthorization"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
entry="$(echo "$response" | _egrep_o '[^\{]*"type":"'$vtype'"[^\}]*')"
|
# Fix for empty error objects in response which mess up the original code, adapted from fix suggested here: https://github.com/acmesh-official/acme.sh/issues/4933#issuecomment-1870499018
|
||||||
|
entry="$(echo "$response" | sed s/'"error":{}'/'"error":null'/ | _egrep_o '[^\{]*"type":"'$vtype'"[^\}]*')"
|
||||||
_debug entry "$entry"
|
_debug entry "$entry"
|
||||||
|
|
||||||
if [ -z "$keyauthorization" -a -z "$entry" ]; then
|
if [ -z "$keyauthorization" -a -z "$entry" ]; then
|
||||||
@@ -6351,7 +6352,8 @@ _deactivate() {
|
|||||||
fi
|
fi
|
||||||
_debug "Trigger validation."
|
_debug "Trigger validation."
|
||||||
vtype="$(_getIdType "$_d_domain")"
|
vtype="$(_getIdType "$_d_domain")"
|
||||||
entry="$(echo "$response" | _egrep_o '[^\{]*"type":"'$vtype'"[^\}]*')"
|
# Fix for empty error objects in response which mess up the original code, adapted from fix suggested here: https://github.com/acmesh-official/acme.sh/issues/4933#issuecomment-1870499018
|
||||||
|
entry="$(echo "$response" | sed s/'"error":{}'/'"error":null'/ | _egrep_o '[^\{]*"type":"'$vtype'"[^\}]*')"
|
||||||
_debug entry "$entry"
|
_debug entry "$entry"
|
||||||
if [ -z "$entry" ]; then
|
if [ -z "$entry" ]; then
|
||||||
_err "$d: Cannot get domain token"
|
_err "$d: Cannot get domain token"
|
||||||
|
Reference in New Issue
Block a user