diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-22 20:38:02 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-22 20:38:02 +0200 |
commit | 95c46082414632687e3ddd52435d476ab9dc320f (patch) | |
tree | cc745a6ddad92f5cfe56470068108c2d9c81fefa /dom | |
parent | a38e87d455f6ad3637deeae20d2ddc57430b498d (diff) | |
download | UXP-95c46082414632687e3ddd52435d476ab9dc320f.tar UXP-95c46082414632687e3ddd52435d476ab9dc320f.tar.gz UXP-95c46082414632687e3ddd52435d476ab9dc320f.tar.lz UXP-95c46082414632687e3ddd52435d476ab9dc320f.tar.xz UXP-95c46082414632687e3ddd52435d476ab9dc320f.zip |
Bug 1329288: Allow content policy consumers to identify contentPolicy checks from docshell
Diffstat (limited to 'dom')
-rw-r--r-- | dom/security/nsCSPContext.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dom/security/nsCSPContext.cpp b/dom/security/nsCSPContext.cpp index a7517f65e..979bd915f 100644 --- a/dom/security/nsCSPContext.cpp +++ b/dom/security/nsCSPContext.cpp @@ -171,9 +171,10 @@ nsCSPContext::ShouldLoad(nsContentPolicyType aContentType, } } - // aExtra is only non-null if the channel got redirected. - bool wasRedirected = (aExtra != nullptr); + // aExtra holds the original URI of the channel if the + // channel got redirected (until we fix Bug 1332422). nsCOMPtr<nsIURI> originalURI = do_QueryInterface(aExtra); + bool wasRedirected = originalURI; bool permitted = permitsInternal(dir, aContentLocation, |