Open Ajadaz opened 10 months ago
Please upgrade to the latest code and try again first. Maybe it's already fixed. acme.sh --upgrade
If it's still not working, please provide the log with --debug 2
, otherwise, nobody can help you.
Also seeing this, exactly as posted.
I inserted this directly above 4693 as a work around...
response="$(echo "$response" | sed s/'"error":{}'/'"error":null'/)"
I tried to issue a new certificate today, but I messed up my nginx config so the issuing failed initially. Subsequent attempts also failed, but after staring at the debug log a bit, it seemed to me that it was an issue with acme.sh.
The debug log makes the issue pretty clear.
The extracted variable
entry
fromresponse
is not correct. It gets cut off right on the closing brace of theerror:{
JSON object.https://github.com/acmesh-official/acme.sh/blob/afacdfcb95e063325d8f01ebc8daa57322307d92/acme.sh#L4693-L4718
The problem is that the regex
_egrep_o '[^\{]*"type":"'$vtype'"[^\}]*'
can not properly handle the error objects, because it starts looking for the first closing}
after finding the type of challenge that was requested. This is problematic when the challenge entry itself contains an object which, of course, needs to be terminated with a}
leading to this unintended behavior.I would have submitted a PR to fix this, but I just could not figure out a good way to extract the entry with regex when the error object can be arbitrarily complex.
The
error
can be arbitrarily complex, because the ACME RFC specifies:And Section 6.7.1 gives a good example of a possible arbitrarily complex
error
objectIf anyone has a good idea for how to deal with these
error
objects that would fit into the codebase, I'd be happy to write it out and submit a PR.