Changeset 95488 in webkit
- Timestamp:
- Sep 19, 2011 3:56:22 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r95482 r95488 1 2011-09-19 Adam Barth <abarth@webkit.org> 2 3 Named property confusion with __proto__ 4 https://bugs.webkit.org/show_bug.cgi?id=68221 5 6 Reviewed by Eric Seidel. 7 8 * http/tests/security/resources/innocent-victim-with-iframe.html: Added. 9 * http/tests/security/window-named-proto-expected.txt: Added. 10 * http/tests/security/window-named-proto.html: Added. 11 1 12 2011-09-19 John Bauman <jbauman@chromium.org> 2 13 -
trunk/Source/WebCore/ChangeLog
r95487 r95488 1 2011-09-19 Adam Barth <abarth@webkit.org> 2 3 Named property confusion with __proto__ 4 https://bugs.webkit.org/show_bug.cgi?id=68221 5 6 Reviewed by Eric Seidel. 7 8 The __proto__ property is super magical because it's not a real named 9 property and it has higher precedence than even interceptors. This 10 confuses this check, which is meant to detech which names will get 11 handled by our interceptor. 12 13 Test: http/tests/security/window-named-proto.html 14 15 * bindings/v8/custom/V8DOMWindowCustom.cpp: 16 (WebCore::V8DOMWindow::namedSecurityCheck): 17 1 18 2011-09-19 Adam Barth <abarth@webkit.org> 2 19 -
trunk/Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
r95362 r95488 561 561 562 562 if (key->IsString()) { 563 DEFINE_STATIC_LOCAL(AtomicString, nameOfProtoProperty, ("__proto__")); 564 563 565 String name = toWebCoreString(key); 564 566 // Notice that we can't call HasRealNamedProperty for ACCESS_HAS … … 566 568 if (type == v8::ACCESS_HAS && target->tree()->child(name)) 567 569 return true; 568 if (type == v8::ACCESS_GET && target->tree()->child(name) && !host->HasRealNamedProperty(key->ToString())) 570 // We need to explicitly compare against nameOfProtoProperty because 571 // V8's JSObject::LocalLookup finds __proto__ before 572 // interceptors and even when __proto__ isn't a "real named property". 573 if (type == v8::ACCESS_GET && target->tree()->child(name) && !host->HasRealNamedProperty(key->ToString()) && name != nameOfProtoProperty) 569 574 return true; 570 575 }
Note: See TracChangeset
for help on using the changeset viewer.