Commit Diff
Diff:
9a672b37122cd24931aee82617b30200637b287c
cbeee4cad1530fa7693c512ac1498f8fc76535a1
Commit:
cbeee4cad1530fa7693c512ac1498f8fc76535a1
Tree:
fb735055ab20b3854b17c5e937044b0565a23aae
Author:
Omar Polo <op@omarpolo.com>
Date:
Thu Jan 28 16:27:40 2021 UTC
Message:
warn about punycode in server definition
commit - 9a672b37122cd24931aee82617b30200637b287c
commit + cbeee4cad1530fa7693c512ac1498f8fc76535a1
blob - 7929e5317f47d66c1de000faec574415f84bcaf5
blob + d64263737b0bc4264a5c370eca18c7b99918fbc0
--- parse.y
+++ parse.y
@@ -86,6 +86,12 @@ vhost : TSERVER TSTRING '{' servopts locations '}' {
host->locations[0].match = (char*)"*";
host->domain = $2;
+ if (strstr($2, "xn--") != NULL) {
+ warnx("%s:%d \"%s\" looks like punycode: "
+ "you should use the decoded hostname."
+ config_path, yylineno);
+ }
+
if (host->cert == NULL || host->key == NULL ||
host->dir == NULL)
errx(1, "invalid vhost definition: %s", $2);
Omar Polo