Bug 1958232 - Allow eval in browser.xhtml and other priviliged contexts with a special pref. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D244306
This commit is contained in:
@@ -646,6 +646,13 @@ bool nsContentSecurityUtils::IsEvalAllowed(JSContext* cx,
|
||||
return true;
|
||||
}
|
||||
|
||||
if (StaticPrefs::
|
||||
security_allow_unsafe_dangerous_privileged_evil_eval_AtStartup()) {
|
||||
MOZ_LOG(sCSMLog, LogLevel::Debug,
|
||||
("Allowing eval() because security.allow_unsafe_dangerous_priviliged_evil_eval is enabled."));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (aIsSystemPrincipal &&
|
||||
StaticPrefs::security_allow_eval_with_system_principal()) {
|
||||
MOZ_LOG(sCSMLog, LogLevel::Debug,
|
||||
|
||||
Reference in New Issue
Block a user