caddyserver/caddy

Using special characters instead of punycode gives hard-to-decrypt errors

Closed this issue · 4 comments

If a domain name has special characters, it's translated into punycode (e.g. å.no -> xn--5ca.no). When setting up caddy on servers that use this, you need to use the translated version (as per my experience so far).

The "failure mode" for using the wrong caddyfile is a 200 response with an empty body. At the very least it would be good to reject caddyfiles with these mistakes with a helpful error.

Wrong

å.no {
    respond "Hello world"
}

Correct

xn--5ca.no {
    respond "Hello world"
}

You can use UTF-8 in domain names as in the first Caddyfile. What is the problem, exactly?

For me it does not work. I get a 200 response with an empty body for the first file, and the correct response for the second file.

EDIT proof: https://correct.småge.no and https://wrong.småge.no

wrong.småge.no {
	respond "Hello world"
}

correct.xn--smge-roa.no {
	respond "Hello world"
}

Ah, sorry, this has been fixed but more recently than I thought: 99dcdf7

(You can try the latest beta, I'm actually hoping to cut a new version today.)

Will close this but feel free to continue discussion if necessary!

Duplicate of #6404