diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-06-21 20:57:09 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-06-21 20:57:09 +0200 |
commit | c1315412cc21a85fb779bef0d87dadde751cfe71 (patch) | |
tree | c21e2ad2a72671f247af3155ba2dee29e7e52b24 /dom/security/nsCSPService.cpp | |
parent | 3f8a6e25520c76304db649c971fe8284bc9c9ab7 (diff) | |
download | UXP-c1315412cc21a85fb779bef0d87dadde751cfe71.tar UXP-c1315412cc21a85fb779bef0d87dadde751cfe71.tar.gz UXP-c1315412cc21a85fb779bef0d87dadde751cfe71.tar.lz UXP-c1315412cc21a85fb779bef0d87dadde751cfe71.tar.xz UXP-c1315412cc21a85fb779bef0d87dadde751cfe71.zip |
Bug 1469150 - CSP: Scripts with valid nonce get blocked if URL redirects
https://bugzilla.mozilla.org/show_bug.cgi?id=1469150
Diffstat (limited to 'dom/security/nsCSPService.cpp')
-rw-r--r-- | dom/security/nsCSPService.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dom/security/nsCSPService.cpp b/dom/security/nsCSPService.cpp index 7344e19fa..f9186b309 100644 --- a/dom/security/nsCSPService.cpp +++ b/dom/security/nsCSPService.cpp @@ -317,11 +317,12 @@ CSPService::AsyncOnChannelRedirect(nsIChannel *oldChannel, loadInfo->LoadingPrincipal()->GetCsp(getter_AddRefs(csp)); if (csp) { + nsCOMPtr<nsISupports> requestContext = loadInfo->GetLoadingContext(); // Pass originalURI as aExtra to indicate the redirect csp->ShouldLoad(policyType, // load type per nsIContentPolicy (uint32_t) newUri, // nsIURI nullptr, // nsIURI - nullptr, // nsISupports + requestContext, // nsISupports EmptyCString(), // ACString - MIME guess originalUri, // aExtra &aDecision); |