mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 576200. CSP breaks spec, defaults to allow *. r=bsterne@mozilla.com, dveditz@mozilla.com
This commit is contained in:
parent
b05fb2a7e9
commit
23e5488b56
@ -272,8 +272,11 @@ CSPRep.fromString = function(aStr, self) {
|
||||
|
||||
} // end directive: loop
|
||||
|
||||
aCSPR.makeExplicit();
|
||||
return aCSPR;
|
||||
// if makeExplicit fails for any reason, default to allow 'none'. This
|
||||
// includes the case where "allow" is not present.
|
||||
if (aCSPR.makeExplicit())
|
||||
return aCSPR;
|
||||
return CSPRep.fromString("allow 'none'", self);
|
||||
};
|
||||
|
||||
CSPRep.prototype = {
|
||||
@ -409,6 +412,7 @@ CSPRep.prototype = {
|
||||
var SD = CSPRep.SRC_DIRECTIVES;
|
||||
var allowDir = this._directives[SD.ALLOW];
|
||||
if (!allowDir) {
|
||||
CSPWarning("'allow' directive required but not present. Reverting to \"allow 'none'\"");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user