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

Unified Diff: third_party/WebKit/Source/core/frame/DOMWindow.cpp

Issue 1887553002: Make sure binding security checks don't pass if the frame is remote. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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/frame/DOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/DOMWindow.cpp b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
index 084b65ec30319fcf20e9834bcd310d10a18a933b..a02e3cc70b21c70290d911d236fb7b061dc26b05 100644
--- a/third_party/WebKit/Source/core/frame/DOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
@@ -263,7 +263,10 @@ String DOMWindow::crossDomainAccessErrorMessage(const LocalDOMWindow* callingWin
// FIXME: This message, and other console messages, have extra newlines. Should remove them.
const SecurityOrigin* activeOrigin = callingWindow->document()->getSecurityOrigin();
const SecurityOrigin* targetOrigin = frame()->securityContext()->getSecurityOrigin();
- ASSERT(!activeOrigin->canAccessCheckSuborigins(targetOrigin));
+ // It's possible for a remote frame to be same origin with respect to a
+ // local frame, but it must still be treated as a disallowed cross-domain
+ // access. See https://crbug.com/601629.
+ ASSERT(frame()->isRemoteFrame() || !activeOrigin->canAccessCheckSuborigins(targetOrigin));
String message = "Blocked a frame with origin \"" + activeOrigin->toString() + "\" from accessing a frame with origin \"" + targetOrigin->toString() + "\". ";

Powered by Google App Engine
This is Rietveld 408576698