mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1247464 - Run CSP report URIs through the URL classifier. r=ckerschb
MozReview-Commit-ID: ERoZAbw1nbf
This commit is contained in:
parent
7e3f410fb0
commit
9049fa458f
@ -851,19 +851,26 @@ nsCSPContext::SendReports(nsISupports* aBlockedContentSource,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// try to create a new channel for every report-uri
|
// try to create a new channel for every report-uri
|
||||||
|
nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL | nsIChannel::LOAD_CLASSIFY_URI;
|
||||||
if (doc) {
|
if (doc) {
|
||||||
rv = NS_NewChannel(getter_AddRefs(reportChannel),
|
rv = NS_NewChannel(getter_AddRefs(reportChannel),
|
||||||
reportURI,
|
reportURI,
|
||||||
doc,
|
doc,
|
||||||
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
|
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
|
||||||
nsIContentPolicy::TYPE_CSP_REPORT);
|
nsIContentPolicy::TYPE_CSP_REPORT,
|
||||||
|
nullptr, // aLoadGroup
|
||||||
|
nullptr, // aCallbacks
|
||||||
|
loadFlags);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rv = NS_NewChannel(getter_AddRefs(reportChannel),
|
rv = NS_NewChannel(getter_AddRefs(reportChannel),
|
||||||
reportURI,
|
reportURI,
|
||||||
mLoadingPrincipal,
|
mLoadingPrincipal,
|
||||||
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
|
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
|
||||||
nsIContentPolicy::TYPE_CSP_REPORT);
|
nsIContentPolicy::TYPE_CSP_REPORT,
|
||||||
|
nullptr, // aLoadGroup
|
||||||
|
nullptr, // aCallbacks
|
||||||
|
loadFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user