summaryrefslogtreecommitdiff
path: root/Source/WebCore/loader/MainResourceLoader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/loader/MainResourceLoader.cpp')
-rw-r--r--Source/WebCore/loader/MainResourceLoader.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/WebCore/loader/MainResourceLoader.cpp b/Source/WebCore/loader/MainResourceLoader.cpp
index 74aa3afc1..0836d8cc0 100644
--- a/Source/WebCore/loader/MainResourceLoader.cpp
+++ b/Source/WebCore/loader/MainResourceLoader.cpp
@@ -204,6 +204,11 @@ void MainResourceLoader::willSendRequest(ResourceRequest& newRequest, const Reso
// reference to this object; one example of this is 3266216.
RefPtr<MainResourceLoader> protect(this);
+ if (!frameLoader()->checkIfFormActionAllowedByCSP(newRequest.url())) {
+ cancel();
+ return;
+ }
+
ASSERT(documentLoader()->timing()->fetchStart());
if (!redirectResponse.isNull()) {
// If the redirecting url is not allowed to display content from the target origin,
@@ -367,7 +372,7 @@ void MainResourceLoader::didReceiveResponse(const ResourceResponse& r)
if (m_frame->loader()->shouldInterruptLoadForXFrameOptions(content, r.url())) {
InspectorInstrumentation::continueAfterXFrameOptionsDenied(m_frame.get(), documentLoader(), identifier(), r);
DEFINE_STATIC_LOCAL(String, consoleMessage, ("Refused to display document because display forbidden by X-Frame-Options.\n"));
- m_frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage);
+ m_frame->document()->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage);
cancel();
return;