Issue #2402 - Remove child-src deprecation warning. https://bugzilla.mozilla.org/show_bug.cgi?id=1486331

This commit is contained in:
Brian Smith 2024-01-04 03:04:31 -06:00 committed by roytam1
commit 1349cf2d01
2 changed files with 3 additions and 11 deletions

View file

@ -1056,14 +1056,10 @@ nsCSPParser::directiveName()
return new nsUpgradeInsecureDirective(CSP_StringToCSPDirective(mCurToken));
}
// child-src by itself is deprecatd but will be enforced
// * for workers (if worker-src is not explicitly specified)
// * for frames (if frame-src is not explicitly specified)
// if we have a child-src, cache it as a fallback for
// * workers (if worker-src is not explicitly specified)
// * frames (if frame-src is not explicitly specified)
if (CSP_IsDirective(mCurToken, nsIContentSecurityPolicy::CHILD_SRC_DIRECTIVE)) {
const char16_t* params[] = { mCurToken.get() };
logWarningErrorToConsole(nsIScriptError::warningFlag,
"deprecatedChildSrcDirective",
params, ArrayLength(params));
mChildSrc = new nsCSPChildSrcDirective(CSP_StringToCSPDirective(mCurToken));
return mChildSrc;
}