Open Bug 1717951 Opened 5 years ago Updated 5 years ago

Fix javascript: URL security check

Categories

(Core :: DOM: Navigation, defect, P3)

defect

Tracking

()

People

(Reporter: d, Unassigned, NeedInfo)

Details

See the minor spec update at https://github.com/whatwg/html/pull/6801 , which comes with more-exhaustive tests than before at https://github.com/web-platform-tests/wpt/pull/29468 .

These tests show that:

  • Firefox appears to be doing a less-permissive same-origin check (from the current spec), instead of the same-origin-domain check (from the spec after that PR). Same-origin-domain makes more sense anyway since if you have synchronous access to the page then you can run JavaScript directly in it, so prohibiting javascript: URL navigation doesn't buy us anything.

  • Firefox is not quite comparing the right two origins (i.e., the origins Safari and Chrome are comparing) in complicated cases involving multiple globals.

Severity: -- → S3
Flags: needinfo?(bugs)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.