Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(801)

Unified Diff: Source/core/frame/csp/ContentSecurityPolicy.cpp

Issue 561693002: CSP: Resolve report endpoints at reporting time, not at parse time. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/csp/ContentSecurityPolicy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/csp/ContentSecurityPolicy.cpp
diff --git a/Source/core/frame/csp/ContentSecurityPolicy.cpp b/Source/core/frame/csp/ContentSecurityPolicy.cpp
index 70add27e7a86109e8fe1aeda97392a8b78851785..e9fd7e6b549111b3e114554e6ade87160f7af273 100644
--- a/Source/core/frame/csp/ContentSecurityPolicy.cpp
+++ b/Source/core/frame/csp/ContentSecurityPolicy.cpp
@@ -619,7 +619,7 @@ static void gatherSecurityPolicyViolationEventData(SecurityPolicyViolationEventI
}
}
-void ContentSecurityPolicy::reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const Vector<KURL>& reportURIs, const String& header)
+void ContentSecurityPolicy::reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const Vector<String>& reportEndpoints, const String& header)
{
// FIXME: Support sending reports from worker.
Document* document = this->document();
@@ -636,7 +636,7 @@ void ContentSecurityPolicy::reportViolation(const String& directiveText, const S
if (experimentalFeaturesEnabled())
frame->domWindow()->enqueueDocumentEvent(SecurityPolicyViolationEvent::create(EventTypeNames::securitypolicyviolation, violationData));
- if (reportURIs.isEmpty())
+ if (reportEndpoints.isEmpty())
return;
// We need to be careful here when deciding what information to send to the
@@ -673,8 +673,8 @@ void ContentSecurityPolicy::reportViolation(const String& directiveText, const S
RefPtr<FormData> report = FormData::create(stringifiedReport.utf8());
- for (size_t i = 0; i < reportURIs.size(); ++i)
- PingLoader::sendViolationReport(frame, reportURIs[i], report, PingLoader::ContentSecurityPolicyViolationReport);
+ for (size_t i = 0; i < reportEndpoints.size(); ++i)
+ PingLoader::sendViolationReport(frame, completeURL(reportEndpoints[i]), report, PingLoader::ContentSecurityPolicyViolationReport);
didSendViolationReport(stringifiedReport);
}
« no previous file with comments | « Source/core/frame/csp/ContentSecurityPolicy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698