[Webkit-unassigned] [Bug 46982] Setting href protocol attribute on malformed URL is incorrect when page is served over HTTP

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 1 17:29:17 PDT 2010


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





--- Comment #2 from Yael <yael.aharon at nokia.com>  2010-10-01 17:29:17 PST ---
I can make the test case even smaller to show the error:

var a = document.createElement('a');

a.href="http:??bar";
alert(a.href);



The reason for the failure is in KURL.cpp, line 401.
if (p[1] != '/' && equalIgnoringCase(base.protocol(), String(str, p - str)) && base.isHierarchical()) 

We compare the protocol of the base url to the protocol of the new utl, and if they match, and the base url is hierarchical, then we assume that either the new url is hierarchical or relative. I don't think that assumption is valid.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list