Closed Bug 1491127 Opened 8 years ago Closed 8 years ago

[wpt-sync] Sync PR 12995 - Implemented the correct 'self' matching logic according to the spec

Categories

(Core :: DOM: Security, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream][domsecurity-backlog])

Sync web-platform-tests PR 12995 into mozilla-central (this bug is closed when the sync is complete). PR: https://github.com/web-platform-tests/wpt/pull/12995 Details from upstream follow. Andy Paicu <andypaicu@chromium.org> wrote: > Implemented the correct 'self' matching logic according to the spec > > Spec: https://w3c.github.io/webappsec-csp/#match-url-to-source-expression > > The 'self' matching logic is similar to the host/scheme-source expression > but different enough where it's causing issues because we're just > reusing the csp_source Matches logic. > > This is incorrect as causes issues such as the related bug. > > This CL covers: > * Added a new MatchesAsSelf function that is used for 'self' expression > matching > * Added unit tests for this function > * Added new test covering the scenario in the bug (wss scheme that matches > scheme) > * Drive-by fixes to some connect-src tests > > There is similar work that needs to be done in the content/ CSP > but since I don't want to duplicate any feedback, I will wait until > this patch looks finalized. > > Bug: 815142 > Change-Id: Ie1d6579e29b9d320e56fcdb556893c7675bd11b8 > Reviewed-on: https://chromium-review.googlesource.com/1225570 > WPT-Export-Revision: 050d60e700c8cbdd8ec6a7fe74c7f5c5f1371bde
Component: web-platform-tests → DOM: Security
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]
Whiteboard: [wptsync downstream][domsecurity-backlog] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]
Whiteboard: [wptsync downstream][domsecurity-backlog] → [wptsync downstream]
Ran 5 tests and 5 subtests OK : 5 PASS : 5
Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/2794ffa8d369 [wpt PR 12995] - Implemented the correct 'self' matching logic according to the spec, a=testonly
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.