mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Bug 1469150 - CSP: Scripts with valid nonce get blocked if URL redirects
https://bugzilla.mozilla.org/show_bug.cgi?id=1469150
This commit is contained in:
parent
09a81da02d
commit
c8131a687a
5 changed files with 100 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue