RESOLVED FIXED 12385
Assertion failure when loading subresources from "data:" frames
https://bugs.webkit.org/show_bug.cgi?id=12385
Summary Assertion failure when loading subresources from "data:" frames
Alexey Proskuryakov
Reported 2007-01-23 11:53:44 PST
copyPathRemovingDots() in KURL.cpp is unprepared to deal with URLs that don't start with a slash, but KURL::init() may pass non-hierarchical base URLs to it.
Attachments
proposed fix (4.02 KB, patch)
2007-01-23 11:58 PST, Alexey Proskuryakov
no flags
proposed fix (5.56 KB, patch)
2007-01-25 12:34 PST, Alexey Proskuryakov
mjs: review+
Alexey Proskuryakov
Comment 1 2007-01-23 11:58:46 PST
Created attachment 12633 [details] proposed fix
mitz
Comment 2 2007-01-23 12:04:53 PST
*** Bug 10431 has been marked as a duplicate of this bug. ***
Maciej Stachowiak
Comment 3 2007-01-23 14:41:35 PST
Maybe the right thing to do for non-hierarchical URLs is to append the relative URL to the scheme instead of the whole URL. Appending to a javascript: URL in particular could have weird consequences and is likely not desired. What do other browsrs do in such cases?
Alexey Proskuryakov
Comment 4 2007-01-24 11:05:59 PST
Comment on attachment 12633 [details] proposed fix It looks like Firefox just renders the URL invalid in such case, and doesn't try to load from it. Maybe this is what we should do for invalid base URLs, too? A more thorough test has uncovered another related issue which I'm going to investigate now - javascript URLs shouldn't be treated as relative.
Alexey Proskuryakov
Comment 5 2007-01-25 12:34:27 PST
Created attachment 12670 [details] proposed fix So, it looks like such URLs are treated as invalid by Firefox. Please note that the code for invalid base URLs was only executed for empty ones, because non-empty invalid base URLs were dealt with at the beginning of KURL::init(). There are still some issues with handling "javascript:" URLs (see comments in the test case), but those are outside KURL, and have bugs of their own filed.
Maciej Stachowiak
Comment 6 2007-01-25 22:21:13 PST
Comment on attachment 12670 [details] proposed fix r=me
Alexey Proskuryakov
Comment 7 2007-01-26 10:29:36 PST
Committed revision 19159.
Note You need to log in before you can comment on or make changes to this bug.