Open shhnjk opened 1 year ago
cc @whatwg/security
WebKit and Chromium seem to throw in this case.
Throwing seems reasonable, but on the other hand I'm not convinced "path attacks" are a real thing.
but on the other hand I'm not convinced "path attacks" are a real thing.
You can watch this talk which explains how Dropbox depends on CSP sandbox.
WebKit and Chromium seem to throw in this case.
Yes, it looks like Blink allows for fragment changes, if I am reading CanChangeToUrlForHistoryApi()
correctly.
With git blame
it seems the original code for equalIgnoringPathQueryAndFragment
is https://codereview.chromium.org/1495013002 from 2015. @mikewest do you know if there was a webcompat reason to ignore query and fragment? Allow overriding the query for opaque origins seems like it's about as much of an issue as allow overriding the path.
https://codereview.chromium.org/1495013002#msg6 is a better record of what I was thinking at the time than I have in my head at the moment. :) I don't recall any compatibility concerns coming into play, and I was apparently looking to whatever HTML said 8 years ago along with spot-checks of Firefox's behavior.
While the specification note around only checking URL in push/replace state makes sense for defending attacks from documents which modified document.domain, this doesn't make sense for CSP sandbox because it is likely to host untrustworthy content which can spoof URL using History API.
Repro steps