Changeset 55674 in webkit
- Timestamp:
- Mar 8, 2010 11:40:49 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r55672 r55674 1 2010-03-08 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Nate Chapin. 4 5 [V8] Block popups from inline script 6 https://bugs.webkit.org/show_bug.cgi?id=35474 7 8 Test that we block popups generated from <script>window.open(...)</script>. 9 10 * http/tests/security/popup-blocked-from-window-open-expected.txt: Added. 11 * http/tests/security/popup-blocked-from-window-open.html: Added. 12 1 13 2010-03-08 Brady Eidson <beidson@apple.com> 2 14 -
trunk/WebCore/ChangeLog
r55673 r55674 1 2010-03-08 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Nate Chapin. 4 5 [V8] Block popups from inline script 6 https://bugs.webkit.org/show_bug.cgi?id=35474 7 8 Apparently, we're supposed to look at the sourceURL to figure out 9 whether we're running a script tag or a hyperlink. This logic is 10 copied from the JSC version. 11 12 Test: http/tests/security/popup-blocked-from-window-open.html 13 14 * bindings/v8/ScriptController.cpp: 15 (WebCore::ScriptController::processingUserGesture): 16 (WebCore::ScriptController::evaluate): 17 1 18 2010-03-08 Stuart Morgan <stuartmorgan@chromium.org> 2 19 -
trunk/WebCore/bindings/v8/ScriptController.cpp
r55207 r55674 191 191 if (eventOk) 192 192 return true; 193 } else if ( activeProxy->inlineCode() && !activeProxy->timerCallback()) {193 } else if (m_sourceURL && m_sourceURL->isNull() && !activeProxy->timerCallback()) { 194 194 // This is the <a href="javascript:window.open('...')> case -> we let it through. 195 195 return true; … … 220 220 { 221 221 String sourceURL = sourceCode.url(); 222 222 const String* savedSourceURL = m_sourceURL; 223 m_sourceURL = &sourceURL; 224 223 225 if (!m_XSSAuditor->canEvaluate(sourceCode.source())) { 224 226 // This script is not safe to be evaluated. … … 238 240 239 241 // Evaluating the JavaScript could cause the frame to be deallocated 240 // so we star ot the keep alive timer here.242 // so we start the keep alive timer here. 241 243 m_frame->keepAlive(); 244 245 m_sourceURL = savedSourceURL; 242 246 243 247 if (object.IsEmpty() || object->IsUndefined())
Note: See TracChangeset
for help on using the changeset viewer.