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:
Ian Melven 2013-01-09 10:57:05 -08:00
Родитель 4784a6d623
Коммит abfd70ff77
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -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 + "://";