зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1488165 - Remove security.csp.enable_violation_events pref, r=dveditz
This commit is contained in:
Родитель
8b5dde736c
Коммит
9290eb7909
|
@ -1137,10 +1137,6 @@ nsCSPContext::FireViolationEvent(
|
|||
Element* aTriggeringElement,
|
||||
const mozilla::dom::SecurityPolicyViolationEventInit& aViolationEventInit)
|
||||
{
|
||||
if (!StaticPrefs::security_csp_enable_violation_events()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (mEventListener) {
|
||||
nsAutoString json;
|
||||
if (aViolationEventInit.ToJSON(json)) {
|
||||
|
|
|
@ -4,11 +4,7 @@
|
|||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script>
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["security.csp.enable_violation_events", true]
|
||||
]
|
||||
});
|
||||
|
||||
document.addEventListener("securitypolicyviolation", (e) => {
|
||||
SimpleTest.is(e.blockedURI, "http://mochi.test:8888/foo/bar.jpg", "blockedURI");
|
||||
SimpleTest.is(e.violatedDirective, "img-src", "violatedDirective")
|
||||
|
|
|
@ -7,8 +7,7 @@ enum SecurityPolicyViolationEventDisposition
|
|||
"enforce", "report"
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, optional SecurityPolicyViolationEventInit eventInitDict),
|
||||
Pref="security.csp.enable_violation_events"]
|
||||
[Constructor(DOMString type, optional SecurityPolicyViolationEventInit eventInitDict)]
|
||||
interface SecurityPolicyViolationEvent : Event
|
||||
{
|
||||
readonly attribute DOMString documentURI;
|
||||
|
|
|
@ -1328,12 +1328,6 @@ VARCACHE_PREF(
|
|||
bool, true
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
"security.csp.enable_violation_events",
|
||||
security_csp_enable_violation_events,
|
||||
bool, true
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
"security.csp.reporting.script-sample.max-length",
|
||||
security_csp_reporting_script_sample_max_length,
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
prefs: [security.csp.enable_violation_events:true]
|
Загрузка…
Ссылка в новой задаче