mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Bug 1735856 - Don't trigger violation events for frame-ancestors r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D134145
This commit is contained in:
parent
0c74571b6a
commit
b197a311a4
@ -1442,8 +1442,12 @@ class CSPReportSenderRunnable final : public Runnable {
|
||||
}
|
||||
|
||||
// 4) fire violation event
|
||||
mCSPContext->FireViolationEvent(mTriggeringElement, mCSPEventListener,
|
||||
init);
|
||||
// A frame-ancestors violation has occurred, but we should not dispatch the
|
||||
// violation event to a potentially cross-origin ancestor.
|
||||
if (!mViolatedDirective.EqualsLiteral("frame-ancestors")) {
|
||||
mCSPContext->FireViolationEvent(mTriggeringElement, mCSPEventListener,
|
||||
init);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -1,4 +0,0 @@
|
||||
[frame-ancestors-none-block.html]
|
||||
[frame-ancestors-none-block]
|
||||
expected: FAIL
|
||||
|
Loading…
Reference in New Issue
Block a user