зеркало из https://github.com/mozilla/gecko-dev.git
Bug 746978 - sync CSP directive parsing and directive names with w3c CSP 1.0 spec - part 6 - fix up toString (r=sstamm)
This commit is contained in:
Родитель
4784a6d623
Коммит
abfd70ff77
|
@ -712,7 +712,7 @@ CSPRep.prototype = {
|
|||
function csp_toString() {
|
||||
var dirs = [];
|
||||
|
||||
if (this._allowEval || this._allowInlineScripts) {
|
||||
if (!this._specCompliant && (this._allowEval || this._allowInlineScripts)) {
|
||||
dirs.push("options" + (this._allowEval ? " eval-script" : "")
|
||||
+ (this._allowInlineScripts ? " inline-script" : ""));
|
||||
}
|
||||
|
@ -1492,6 +1492,12 @@ CSPSource.prototype = {
|
|||
if (this._isSelf)
|
||||
return this._self.toString();
|
||||
|
||||
if (this._allowUnsafeInline)
|
||||
return "unsafe-inline";
|
||||
|
||||
if (this._allowUnsafeEval)
|
||||
return "unsafe-eval";
|
||||
|
||||
var s = "";
|
||||
if (this.scheme)
|
||||
s = s + this.scheme + "://";
|
||||
|
|
Загрузка…
Ссылка в новой задаче