Deactivate the order in case of failure in setChallenge(me, options, auth); #15
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When calling ACME._setChallenge(me, options, auth);
There is a chance that the promise will be rejected.
In such case the order should be deactivated - if it won't be deactivated it will remain in status
pending
.The fix can be something like this:
return ACME._setChallenge(me, options, auth).then(respondToChallenge).catch(async (e) => {
await deactivate();
//rethrow the original error.
throw e;
});
Another thing that I find is that deactivation is not working. When acme-v2 calls to deactivate it use incorrect url:
the request for deactivating is looked like this:
It use the ch.url which is the url of the challenge. and when it post it, lets encrypt think that they now should validate the order, and then the Authorization move to invalid status instead (the challeng was not setisfied) of deatviced
The correct url that should be used is the authorization url, si the request should look like:
Thanks for digging into this. I haven't made this change yet, but I think we can make quick work of it since you've identified the problem so clearly.
Thank you very much.
Fixed in v3.