mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1223743 - CSP: Check baseChannel for CSP when loading multipart channel (r=sicking)
This commit is contained in:
parent
66c4d1d72e
commit
f49ac41af8
@ -2678,6 +2678,16 @@ nsDocument::InitCSP(nsIChannel* aChannel)
|
||||
nsAutoCString tCspHeaderValue, tCspROHeaderValue;
|
||||
|
||||
nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aChannel);
|
||||
if (!httpChannel) {
|
||||
// check baseChannel for CSP when loading a multipart channel
|
||||
nsCOMPtr<nsIMultiPartChannel> multipart = do_QueryInterface(aChannel);
|
||||
if (multipart) {
|
||||
nsCOMPtr<nsIChannel> baseChannel;
|
||||
multipart->GetBaseChannel(getter_AddRefs(baseChannel));
|
||||
httpChannel = do_QueryInterface(baseChannel);
|
||||
}
|
||||
}
|
||||
|
||||
if (httpChannel) {
|
||||
httpChannel->GetResponseHeader(
|
||||
NS_LITERAL_CSTRING("content-security-policy"),
|
||||
|
Loading…
Reference in New Issue
Block a user