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

Unified Diff: LayoutTests/editing/execCommand/apply-style-iframe-crash.html

Issue 71163005: Prevent recursive call of Document::execCommand() to protect from attack code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-11-13T18:35:41 Created 7 years, 1 month 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: LayoutTests/editing/execCommand/apply-style-iframe-crash.html
diff --git a/LayoutTests/editing/execCommand/apply-style-iframe-crash.html b/LayoutTests/editing/execCommand/apply-style-iframe-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..9df4567f795fa6981c2cd8527e6eff39056e5b63
--- /dev/null
+++ b/LayoutTests/editing/execCommand/apply-style-iframe-crash.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<h1><button><iframe></iframe></button>
+</h1><input><iframe xonload="
+ if (document.counter)
+ document.counter++;
+ else
+ document.counter = 1;
+
+ if (document.counter <= 16) {
+ document.designMode='on';
+ document.execCommand('selectall');
+ document.execCommand('italic');
+ }" ></iframe>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+onload = function() {
+ document.body.textContent = 'PASS; NOT CRASHED';
+};
+</script>

Powered by Google App Engine
This is Rietveld 408576698