summaryrefslogtreecommitdiff
path: root/dom/security
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-09-21 14:08:22 +0000
committerMoonchild <moonchild@palemoon.org>2022-09-21 14:08:22 +0000
commit24ee0680b1b5ec81efd17e708f8faa21e6649cb3 (patch)
tree425a5d1d746c9098273b600cc10d9d0037a17073 /dom/security
parentfc5b767f5dbed652966eea65f61036a97d9b893a (diff)
downloaduxp-24ee0680b1b5ec81efd17e708f8faa21e6649cb3.tar.gz
[DOM security] Be more explicit about CSP checks and reports.
Diffstat (limited to 'dom/security')
-rw-r--r--dom/security/nsCSPContext.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/dom/security/nsCSPContext.cpp b/dom/security/nsCSPContext.cpp
index ec698b91d0..544fe118b7 100644
--- a/dom/security/nsCSPContext.cpp
+++ b/dom/security/nsCSPContext.cpp
@@ -1309,6 +1309,7 @@ NS_IMETHODIMP
nsCSPContext::Permits(nsIURI* aURI,
CSPDirective aDir,
bool aSpecific,
+ bool aSendViolationReports,
bool* outPermits)
{
// Can't perform check without aURI
@@ -1323,13 +1324,13 @@ nsCSPContext::Permits(nsIURI* aURI,
false, // not redirected.
false, // not a preload.
aSpecific,
- true, // send violation reports
+ aSendViolationReports,
true, // send blocked URI in violation reports
false); // not parser created
if (CSPCONTEXTLOGENABLED()) {
- CSPCONTEXTLOG(("nsCSPContext::Permits, aUri: %s, aDir: %d, isAllowed: %s",
- aURI->GetSpecOrDefault().get(), aDir,
+ CSPCONTEXTLOG(("nsCSPContext::Permits, aUri: %s, aDir: %s, isAllowed: %s",
+ aURI->GetSpecOrDefault().get(), CSP_CSPDirectiveToString(aDir),
*outPermits ? "allow" : "deny"));
}