Skip to content

Commit cceb435

Browse files
authored
Verify domain is not empty after Unicode ToASCII
The empty host is not allowed in special non-"file" URLs, but Unicode ToASCII can result in the empty string, even if the input is not empty, for example: * the input consists entirely of IDNA ignored code points * the input is `xn--`. Domain to ASCII (which invokes Unicode ToASCII) does not fail when it is called from the host parser with such an input, because VerifyDnsLength is false. So it needs an additional check. Tests: web-platform-tests/wpt#23432.
1 parent 8315a80 commit cceb435

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

url.bs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ decisions made, i.e. whether to use the <a>same site</a> or <a>schemelessly same
397397

398398
<li><p>If <var>result</var> is a failure value, <a>validation error</a>, return failure.
399399

400+
<li><p>If <var>result</var> is the empty string, <a>validation error</a>, return failure.
401+
400402
<li><p>Return <var>result</var>.
401403
</ol>
402404

0 commit comments

Comments
 (0)