You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the type-object in $response can contain other objects in case of an error. for example:
response='{"identifier":{"type":"dns","value":"example.com"},"status":"invalid","expires":"2018-01-19T01:31:55Z","challenges":[{"type":"dns-01","status":"invalid","error":{"type":"urn:ietf:params:acme:error:connection","detail":"DNS problem: NXDOMAIN looking up TXT for _acme-challenge.example.com","status": 400},"url":"https://acme-staging-v02.api.letsencrypt.org/acme/challenge/8m497...gfDiwc/91764091","token":"kKSZCs...Z9ung","keyAuthorization":"kKSZCs...Z9ung.HOF2...peL8"}],"wildcard": true}'
the regular expression '[^\{]*"type":"'$vtype'"[^\}]*' fails here. the variables token and uri are then empty. if you delete the error object here, the script works and later the (following) correct error appears: "Unable to update challenge :: The challenge is not pending."
this message helps a little bit more than an avoidable curl (3) error
example:
entry="$(printf "%s\n" "$response" | sed 's/,"error":{[^}]*}//g' | _egrep_o '[^\{]*"type":"'$vtype'"[^\}]*')"
I only took a quick look at the source code. Maybe you (can|must) catch the error before.
btw… thanks for your work!
The text was updated successfully, but these errors were encountered:
https://github.com/Neilpang/acme.sh/blob/e6cda79ee8411255d191f7781df42522bbf3aedc/acme.sh#L3578
the type-object in $response can contain other objects in case of an error. for example:
response='{"identifier":{"type":"dns","value":"example.com"},"status":"invalid","expires":"2018-01-19T01:31:55Z","challenges":[{"type":"dns-01","status":"invalid","error":{"type":"urn:ietf:params:acme:error:connection","detail":"DNS problem: NXDOMAIN looking up TXT for _acme-challenge.example.com","status": 400},"url":"https://acme-staging-v02.api.letsencrypt.org/acme/challenge/8m497...gfDiwc/91764091","token":"kKSZCs...Z9ung","keyAuthorization":"kKSZCs...Z9ung.HOF2...peL8"}],"wildcard": true}'
the regular expression
'[^\{]*"type":"'$vtype'"[^\}]*'
fails here. the variablestoken
anduri
are then empty. if you delete the error object here, the script works and later the (following) correct error appears: "Unable to update challenge :: The challenge is not pending."this message helps a little bit more than an avoidable curl (3) error
example:
I only took a quick look at the source code. Maybe you
(can|must)
catch the error before.btw… thanks for your work!
The text was updated successfully, but these errors were encountered: