From ea1a1fd9ac8955fdbd05f8486abc58570e3a8fa3 Mon Sep 17 00:00:00 2001 From: Sid Stamm Date: Fri, 27 Sep 2013 10:43:59 -0700 Subject: [PATCH] Bug 916881 - remove stray refinePolicy in CSPUtils.jsm. r=grobinson --- content/base/src/CSPUtils.jsm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/content/base/src/CSPUtils.jsm b/content/base/src/CSPUtils.jsm index 1576fe3d649b..c8cfa42e213c 100644 --- a/content/base/src/CSPUtils.jsm +++ b/content/base/src/CSPUtils.jsm @@ -152,9 +152,13 @@ CSPPolicyURIListener.prototype = { this._reportOnly, this._csp._specCompliant); } else { - // problem fetching policy so fail closed - this._csp.refinePolicy("default-src 'none'", this._docURI, - this._csp._specCompliant); + // problem fetching policy so fail closed by appending a "block it all" + // policy. Also toss an error into the console so developers can see why + // this policy is used. + this._csp.log(WARN_FLAG, CSPLocalizer.getFormatStr("errorFetchingPolicy", + [status]); + this._csp.appendPolicy("default-src 'none'", this._docURI, + this._reportOnly, this._csp._specCompliant); } // resume the parent document request this._docRequest.resume();