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

Unified Diff: third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp

Issue 1718403002: Fix security checks when navigating remote frames to javascript: URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix check Created 4 years, 10 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: third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp b/third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp
index cfa82039cce6ec957d62d48125a42d95245c3e86..2a0c62e18e90c47fb84a22bb89375021bc3e68a9 100644
--- a/third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp
@@ -59,8 +59,7 @@ bool HTMLFrameElementBase::isURLAllowed() const
const KURL& completeURL = document().completeURL(m_URL);
if (protocolIsJavaScript(completeURL)) {
- Document* contentDoc = this->contentDocument();
- if (contentDoc && !ScriptController::canAccessFromCurrentOrigin(contentDoc->frame()))
+ if (contentFrame() && !ScriptController::canAccessFromCurrentOrigin(document(), contentFrame()))
return false;
}

Powered by Google App Engine
This is Rietveld 408576698