Originally reported by sasha zivojinovic at crbug.com/142636 XSSAuditor's isSameOrignRequest() gets tripped up when the main page is loaded from say file:/// (which has no host portion) and the injected payload is from data: (which has no host portion). No risk of cookie theft from data: URLs, but can do nuisance things like navigate the top page. Unclear whether there are really any protocols that need this protection.
Created attachment 159561 [details] Patch + test case.
Changed the name of the function so that it doesn't say "same origin" whilst completely ignoring scheme and port.
Comment on attachment 159561 [details] Patch + test case. Ok. We added this to weed out some false positives, but they were all for URLs that had hosts, so this is probably fine.
Comment on attachment 159561 [details] Patch + test case. Clearing flags on attachment: 159561 Committed r126120: <http://trac.webkit.org/changeset/126120>
All reviewed patches have been landed. Closing bug.