[Webkit-unassigned] [Bug 127970] Solidus stripping in DOMURL::setHostname seems wrong

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 24 15:04:21 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=127970

--- Comment #3 from Timothy Gu <timothygu99 at gmail.com> ---
This is still an issue, but it only affects setHostname(), not setHost(). I don't have permissions to reopen this bug, but consider

    u = new URL('http://abc/');
    u.hostname = '////def';
    console.log(u.href);

versus

    u = new URL('http://abc/');
    u.host = '////def';
    console.log(u.href);

In the first case, the resultant URL is http://def/, while in the second it is http://abc/. The code that does this has indeed moved to URLDecomposition:

https://github.com/WebKit/WebKit/blob/4d78e56eb5b61d8f62844ab855e411477d031870/Source/WebCore/html/URLDecomposition.cpp#L152

Search for "removeAllLeadingSolidusCharacters".

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210524/ee38fae1/attachment-0001.htm>


More information about the webkit-unassigned mailing list