Bug 115396
| Summary: | Constructing the KURL from base + fragment ref is problematic for data: URI | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
| Component: | SVG | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Normal | CC: | ahmad.saleem792, ap, beidson, bfulgham, simon.fraser, zalan, zimmermann |
| Priority: | P2 | Keywords: | BlinkMergeCandidate |
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ryosuke Niwa
We should consider merging https://chromium.googlesource.com/chromium/blink/+/2274b648033402fc691536b45daf8b00486dc72a
Constructing the KURL from base + fragment ref is problematic for data: URI, as it is not a
hierarchical scheme and relative resolution fails.
Luckily, this is avoidable: the only reason for constructing a KURL is to compare against the
document URL, but the comparison ignores the fragment anyway (equalIgnoringFragmentIdentifier).
This is equivalent to a base-only comparison, which is the approach proposed in this patch.
No test: the issue only triggers when the document url is data: URI based, and DRT doesn't seem to
support opening such a scheme directly. Current baseURI vs. document URL validation is covered by
existing tests.
(For background on why we perform such validation in the first place, see
https://bugs.webkit.org/show_bug.cgi?id=63283
https://bugzilla.mozilla.org/show_bug.cgi?id=308590)
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
I am not sure whether this is needed or not but this is where current Webkit GitHub code is:
https://github.com/WebKit/WebKit/blob/19c49cf8315e01cec9894d2233f7179e60e9664a/Source/WebCore/svg/SVGURIReference.cpp#L72
Plus there was no test case to test new behaviour, hence also why I am not sure whether this is needed or not.
I will leave it for others to confirm. Thanks!
Ryosuke Niwa
We've rewritten our URL implementation since then so I doubt this patch is worth considering of a merge at this point.