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:
Rob Wu 2021-12-20 13:46:46 +00:00
Родитель 0c74571b6a
Коммит b197a311a4
2 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -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