tls: Normalization IPv6 addresses in r.Host for ACME challenge#7619
tls: Normalization IPv6 addresses in r.Host for ACME challenge#7619u5surf wants to merge 1 commit intocaddyserver:masterfrom
Conversation
|
I think there may still be one gap here in the actual HTTP-challenge serving path. This normalises
In CertMagic, the final HTTP-challenge check still compares So I’m not sure this fully fixes the remaining |
|
Please disclose the use of LLM appropriately. That part of the PR template seems to be malformed. |
|
@steadytao Hello, Are you saying we need to fix the CertMagic side as well? |
|
Not necessarily CertMagic itself but I do think there is still one more place that needs the same normalisation. Right now this PR normalizes
But the actual solver calls still receive the original request with the raw bracketed host:
So my concern is that the lookup can now succeed but the final HTTP-challenge serving step may still fail because those paths still read That could be fixed either here in Caddy by passing a cloned request with the normalised host into the solver path or in CertMagic by normalising there more centrally. I just don’t think the current PR fully closes the loop yet. |
Signed-off-by: Y.Horie <u5.horie@gmail.com>
|
LGTM. The test coverage could be expanded a bit further with a more integration-style case but otherwise this looks good to me. |
|
Thanks for the PR. What if we just fix the normalization in CertMagic rather than cloning the request to hack around it? |
|
@mholt Thanks reviewing. That's suggestive. I opened the new PR in certmagic. Please take a look this. |
Fixes: #7399
go https host IPv6 addresses written in r.Host has brackets, it has caused mismatch in ACME challenge, because it verified without bracket IPv6 addresses.
Assistance Disclosure