mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-21 07:47:32 +09:00
moebius#130: URL parser - fix: don't allow empty host name
https://github.com/MoonchildProductions/moebius/issues/130
This commit is contained in:
parent
aa1df43166
commit
196fddddb6
14 changed files with 51 additions and 72 deletions
|
|
@ -346,6 +346,14 @@ add_test(function test_backslashReplacement()
|
|||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_authority_host()
|
||||
{
|
||||
Assert.throws(() => { stringToURL("http:"); }, "TYPE_AUTHORITY should have host");
|
||||
Assert.throws(() => { stringToURL("http:///"); }, "TYPE_AUTHORITY should have host");
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_trim_C0_and_space()
|
||||
{
|
||||
var url = stringToURL("\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f http://example.com/ \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f ");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue