Title: [107046] trunk
- Revision
- 107046
- Author
- [email protected]
- Date
- 2012-02-08 00:13:58 -0800 (Wed, 08 Feb 2012)
Log Message
Replace [CheckNodeSecurity] with [CheckAccessToNode]
https://bugs.webkit.org/show_bug.cgi?id=77971
Reviewed by Adam Barth.
Source/WebCore:
[CheckNodeSecurity] is not implemented by code generators.
This patch replaces [CheckNodeSecurity] with [CheckAccessToNode].
Test: http/tests/security/cross-frame-access-frameelement.html
* page/DOMWindow.idl:
LayoutTests:
The added test checks if frameElement is accessible from the same or cross origin iframe.
* http/tests/security/cross-frame-access-frameelement-expected.txt: Added.
* http/tests/security/cross-frame-access-frameelement.html: Added.
* http/tests/security/resources/cross-frame-access-frameelement-from-iframe.html: Added.
* platform/chromium/http/tests/security/cross-frame-access-put-expected.txt: Updated the test result.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (107045 => 107046)
--- trunk/LayoutTests/ChangeLog 2012-02-08 08:05:56 UTC (rev 107045)
+++ trunk/LayoutTests/ChangeLog 2012-02-08 08:13:58 UTC (rev 107046)
@@ -1,3 +1,17 @@
+2012-02-08 Kentaro Hara <[email protected]>
+
+ Replace [CheckNodeSecurity] with [CheckAccessToNode]
+ https://bugs.webkit.org/show_bug.cgi?id=77971
+
+ Reviewed by Adam Barth.
+
+ The added test checks if frameElement is accessible from the same or cross origin iframe.
+
+ * http/tests/security/cross-frame-access-frameelement-expected.txt: Added.
+ * http/tests/security/cross-frame-access-frameelement.html: Added.
+ * http/tests/security/resources/cross-frame-access-frameelement-from-iframe.html: Added.
+ * platform/chromium/http/tests/security/cross-frame-access-put-expected.txt: Updated the test result.
+
2012-02-07 Robert Kroeger <[email protected]>
[chromium] Remove unnecessary Chromium gesture recognizer tests.
Added: trunk/LayoutTests/http/tests/security/cross-frame-access-frameelement-expected.txt (0 => 107046)
--- trunk/LayoutTests/http/tests/security/cross-frame-access-frameelement-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/security/cross-frame-access-frameelement-expected.txt 2012-02-08 08:13:58 UTC (rev 107046)
@@ -0,0 +1,15 @@
+CONSOLE MESSAGE: Unsafe _javascript_ attempt to access frame with URL http://127.0.0.1:8000/security/cross-frame-access-frameelement.html from frame with URL http://127.0.0.1:8080/security/resources/cross-frame-access-frameelement-from-iframe.html. Domains, protocols and ports must match.
+
+This test checks if frameElement is accessible from the same or cross origin iframe.
+
+
+
+--------
+Frame: '<!--framePath //<!--frame0-->-->'
+--------
+[object HTMLIFrameElement]
+
+--------
+Frame: '<!--framePath //<!--frame1-->-->'
+--------
+undefined
Added: trunk/LayoutTests/http/tests/security/cross-frame-access-frameelement.html (0 => 107046)
--- trunk/LayoutTests/http/tests/security/cross-frame-access-frameelement.html (rev 0)
+++ trunk/LayoutTests/http/tests/security/cross-frame-access-frameelement.html 2012-02-08 08:13:58 UTC (rev 107046)
@@ -0,0 +1,15 @@
+<html>
+<head>
+<script>
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpChildFramesAsText();
+}
+</script>
+</head>
+<body>
+<p>This test checks if frameElement is accessible from the same or cross origin iframe.</p>
+<iframe src=""
+<iframe src=""
+</body>
+</html>
Added: trunk/LayoutTests/http/tests/security/resources/cross-frame-access-frameelement-from-iframe.html (0 => 107046)
--- trunk/LayoutTests/http/tests/security/resources/cross-frame-access-frameelement-from-iframe.html (rev 0)
+++ trunk/LayoutTests/http/tests/security/resources/cross-frame-access-frameelement-from-iframe.html 2012-02-08 08:13:58 UTC (rev 107046)
@@ -0,0 +1,7 @@
+<body>
+<div id="console"></div>
+<script src=""
+<script>
+log(eval("window.frameElement"));
+</script>
+</body>
Modified: trunk/LayoutTests/platform/chromium/http/tests/security/cross-frame-access-put-expected.txt (107045 => 107046)
--- trunk/LayoutTests/platform/chromium/http/tests/security/cross-frame-access-put-expected.txt 2012-02-08 08:05:56 UTC (rev 107045)
+++ trunk/LayoutTests/platform/chromium/http/tests/security/cross-frame-access-put-expected.txt 2012-02-08 08:13:58 UTC (rev 107046)
@@ -1,3 +1,5 @@
+CONSOLE MESSAGE: Unsafe _javascript_ attempt to access frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html from frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html. Domains, protocols and ports must match.
+
CONSOLE MESSAGE: Unsafe _javascript_ attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match.
CONSOLE MESSAGE: Unsafe _javascript_ attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match.
@@ -483,7 +485,9 @@
ALERT: PASS: window.document should be '[object HTMLDocument]' and is.
ALERT: PASS: window.embeds should be 'undefined' and is.
ALERT: PASS: window.event should be 'undefined' and is.
-ALERT: PASS: window.frameElement should be '[object HTMLIFrameElement]' and is.
+CONSOLE MESSAGE: Unsafe _javascript_ attempt to access frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html from frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html. Domains, protocols and ports must match.
+
+ALERT: PASS: window.frameElement should be 'undefined' and is.
ALERT: PASS: window.frames should be '[object DOMWindow]' and is.
ALERT: PASS: window.history should be '[object History]' and is.
ALERT: PASS: window.images should be 'undefined' and is.
Modified: trunk/Source/WebCore/ChangeLog (107045 => 107046)
--- trunk/Source/WebCore/ChangeLog 2012-02-08 08:05:56 UTC (rev 107045)
+++ trunk/Source/WebCore/ChangeLog 2012-02-08 08:13:58 UTC (rev 107046)
@@ -1,5 +1,19 @@
2012-02-08 Kentaro Hara <[email protected]>
+ Replace [CheckNodeSecurity] with [CheckAccessToNode]
+ https://bugs.webkit.org/show_bug.cgi?id=77971
+
+ Reviewed by Adam Barth.
+
+ [CheckNodeSecurity] is not implemented by code generators.
+ This patch replaces [CheckNodeSecurity] with [CheckAccessToNode].
+
+ Test: http/tests/security/cross-frame-access-frameelement.html
+
+ * page/DOMWindow.idl:
+
+2012-02-08 Kentaro Hara <[email protected]>
+
Rename [CustomPushEventHandlerScope] to [JSCustomPushEventHandlerScope]
https://bugs.webkit.org/show_bug.cgi?id=78081
Modified: trunk/Source/WebCore/page/DOMWindow.idl (107045 => 107046)
--- trunk/Source/WebCore/page/DOMWindow.idl 2012-02-08 08:05:56 UTC (rev 107045)
+++ trunk/Source/WebCore/page/DOMWindow.idl 2012-02-08 08:13:58 UTC (rev 107046)
@@ -60,7 +60,7 @@
DOMSelection getSelection();
- readonly attribute [CheckNodeSecurity] Element frameElement;
+ readonly attribute [CheckAccessToNode] Element frameElement;
[DoNotCheckDomainSecurity] void focus();
[DoNotCheckDomainSecurity] void blur();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes