letsencrypt-cloudflare-hook
letsencrypt-cloudflare-hook copied to clipboard
fix ValueError in invalid_challenge
The error message may contain spaces and seems to be not quoted by dehydrated.
The error this fixes looks like this in the logs:
+ CloudFlare hook executing: invalid_challenge
Traceback (most recent call last):
File "/opt/dehydrated-cloudflare-hook/hook.py", line 207, in <module>
main(sys.argv[1:])
File "/opt/dehydrated-cloudflare-hook/hook.py", line 204, in main
ops[argv[0]](argv[1:])
File "/opt/dehydrated-cloudflare-hook/hook.py", line 159, in invalid_challenge
domain, result = args
ValueError: too many values to unpack (expected 2)
with the fix this turns into:
+ CloudFlare hook executing: invalid_challenge
+ invalid_challenge for *.[redacted]
+ Full error: { "type": "dns-01", "status": "invalid", "error": { "type": "urn:ietf:params:acme:error:unauthorized", "detail": "No TXT record found at _acme-challenge.[redacted]", "status": 403 }, "url": "https://acme-v02.api.letsencrypt.org/acme/challenge/[redacted]", "token": "[redacted]" }
ERROR: Challenge is invalid! (returned: invalid) (result: {
"type": "dns-01",
"status": "invalid",
"error": {
"type": "urn:ietf:params:acme:error:unauthorized",
"detail": "No TXT record found at _acme-challenge.[redacted]",
"status": 403
},
"url": "https://acme-v02.api.letsencrypt.org/acme/challenge/[redacted]",
"token": "[redacted]"
})
This repo is no longer actively maintained. https://github.com/SeattleDevs/letsencrypt-cloudflare-hook is the maintained forked. I have cherry picked your commit and added it to that repo. Feel free to open future PRs in that repo.