From 9049fa458f5a004480f556e33d39f3ca60502427 Mon Sep 17 00:00:00 2001 From: Francois Marier Date: Thu, 11 Feb 2016 17:36:13 -0800 Subject: [PATCH] Bug 1247464 - Run CSP report URIs through the URL classifier. r=ckerschb MozReview-Commit-ID: ERoZAbw1nbf --- dom/security/nsCSPContext.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dom/security/nsCSPContext.cpp b/dom/security/nsCSPContext.cpp index b4a473cff8e..9d535ed0490 100644 --- a/dom/security/nsCSPContext.cpp +++ b/dom/security/nsCSPContext.cpp @@ -851,19 +851,26 @@ nsCSPContext::SendReports(nsISupports* aBlockedContentSource, } // try to create a new channel for every report-uri + nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL | nsIChannel::LOAD_CLASSIFY_URI; if (doc) { rv = NS_NewChannel(getter_AddRefs(reportChannel), reportURI, doc, nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL, - nsIContentPolicy::TYPE_CSP_REPORT); + nsIContentPolicy::TYPE_CSP_REPORT, + nullptr, // aLoadGroup + nullptr, // aCallbacks + loadFlags); } else { rv = NS_NewChannel(getter_AddRefs(reportChannel), reportURI, mLoadingPrincipal, 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)) {