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

Side by Side 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: Pass v8::Isolate directly 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Simon Hausmann (hausmann@kde.org) 4 * (C) 2000 Simon Hausmann (hausmann@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 53
54 bool HTMLFrameElementBase::isURLAllowed() const 54 bool HTMLFrameElementBase::isURLAllowed() const
55 { 55 {
56 if (m_URL.isEmpty()) 56 if (m_URL.isEmpty())
57 return true; 57 return true;
58 58
59 const KURL& completeURL = document().completeURL(m_URL); 59 const KURL& completeURL = document().completeURL(m_URL);
60 60
61 if (protocolIsJavaScript(completeURL)) { 61 if (protocolIsJavaScript(completeURL)) {
62 Document* contentDoc = this->contentDocument(); 62 if (contentFrame() && !ScriptController::canAccessFromCurrentOrigin(toIs olate(&document()), contentFrame()))
63 if (contentDoc && !ScriptController::canAccessFromCurrentOrigin(contentD oc->frame()))
64 return false; 63 return false;
65 } 64 }
66 65
67 LocalFrame* parentFrame = document().frame(); 66 LocalFrame* parentFrame = document().frame();
68 if (parentFrame) 67 if (parentFrame)
69 return parentFrame->isURLAllowed(completeURL); 68 return parentFrame->isURLAllowed(completeURL);
70 69
71 return true; 70 return true;
72 } 71 }
73 72
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 frameOwnerPropertiesChanged(); 247 frameOwnerPropertiesChanged();
249 } 248 }
250 249
251 void HTMLFrameElementBase::setMarginHeight(int marginHeight) 250 void HTMLFrameElementBase::setMarginHeight(int marginHeight)
252 { 251 {
253 m_marginHeight = marginHeight; 252 m_marginHeight = marginHeight;
254 frameOwnerPropertiesChanged(); 253 frameOwnerPropertiesChanged();
255 } 254 }
256 255
257 } // namespace blink 256 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698