mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibURL: Fix heuristic for URL domain parsing IDNA fast path
Our heuristic was a bit too simplistic and would not run through the ToASCII unicode algorithm which performs some extra validation. This would cause invalid URLs that should fail to be parsed be mistakenly accepted. This fixes 8 tests in: https://wpt.live/url/url-constructor.any.html
This commit is contained in:
committed by
Tim Ledbetter
parent
fd4e943e12
commit
db3f118046
Notes:
github-actions[bot]
2024-08-06 22:09:08 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/db3f1180464 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/987 Reviewed-by: https://github.com/tcl3 ✅
2
Tests/LibWeb/Text/expected/URL/invalid-urls.txt
Normal file
2
Tests/LibWeb/Text/expected/URL/invalid-urls.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
new URL('file://xn--/p', undefined)
|
||||
error creating URL: 'TypeError: Invalid URL'
|
||||
Reference in New Issue
Block a user