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

Unified Diff: Source/core/html/HTMLFormElement.cpp

Issue 431273006: Fixing the case where mixed content checking for insecure form submission in secure origins is brea… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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
Index: Source/core/html/HTMLFormElement.cpp
diff --git a/Source/core/html/HTMLFormElement.cpp b/Source/core/html/HTMLFormElement.cpp
index 8f5b8f24761c68d7ff4a629a174204a47721c5e6..8a17449f0268b7e2cf592c91e8282bf89fc24f08 100644
--- a/Source/core/html/HTMLFormElement.cpp
+++ b/Source/core/html/HTMLFormElement.cpp
@@ -503,8 +503,11 @@ void HTMLFormElement::parseAttribute(const QualifiedName& name, const AtomicStri
// If the new action attribute is pointing to insecure "action" location from a secure page
// it is marked as "passive" mixed content.
KURL actionURL = document().completeURL(m_attributes.action().isEmpty() ? document().url().string() : m_attributes.action());
- if (MixedContentChecker::isMixedContent(document().securityOrigin(), actionURL))
- document().frame()->loader().mixedContentChecker()->canSubmitToInsecureForm(document().securityOrigin(), actionURL);
+ // Check if the DOM has a frame before checking mixed content (crbug/398066).
jww 2014/08/01 23:20:52 It's clear that you're checking if the DOM has a f
mhm 2014/08/01 23:28:44 Done.
+ if (document().frame()) {
+ if (MixedContentChecker::isMixedContent(document().securityOrigin(), actionURL))
+ document().frame()->loader().mixedContentChecker()->canSubmitToInsecureForm(document().securityOrigin(), actionURL);
+ }
} else if (name == targetAttr)
m_attributes.setTarget(value);
else if (name == methodAttr)

Powered by Google App Engine
This is Rietveld 408576698