[Webkit-unassigned] [Bug 33971] Check base URI validity before using in SVGImageLoader::sourceURI
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jan 31 14:23:10 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=33971
Cosmin Truta <ctruta at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ctruta at chromium.org
--- Comment #5 from Cosmin Truta <ctruta at chromium.org> 2011-01-31 14:23:10 PST ---
The following comment currently exists in KURLGoogle.cpp:
// When KURL encounters an error such that the URL is invalid and empty
// (for example, resolving a relative URL on a non-hierarchical base), it
// will produce an isNull URL, and calling setUtf8 will produce an empty
// non-null URL. This is unlikely to affect anything, but we preserve this
// just in case.
It looks like this bug is caused by this behavior.
More specifically, here is what's happening if base="" and relative="foo.svg":
* KURLGooglePrivate::init assumes (incorrectly?) that url_util::ResolveRelative always sets &output, regardless whether it returns VALID or INVALID.
* url_util::ResolveRelative only sets &output if url_canon::IsRelativeURL returns TRUE.
* url_canon::IsRelativeURL returns FALSE:
- IsRelativeURL does not allow relative URLs if the base scheme does not support it.
- base="", therefore it has no scheme.
While I agree that a URL composed from base="" and relative="foo.svg" is invalid, I think that the behavior of KURL to set output="foo.svg" is useful (in contrast with the behavior of KURLGooglePrivate to set output="").
In order to resolve this bug, KURLGooglePrivate must agree with KURL.
--
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