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

Unified Diff: LayoutTests/http/tests/security/xssAuditor/script-tag-post-redirect.html

Issue 128823003: XSSAuditor takes post body from current request, not the original request. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: re-upload following branch Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/security/xssAuditor/script-tag-post-redirect.html
diff --git a/LayoutTests/http/tests/security/xssAuditor/script-tag-post-redirect.html b/LayoutTests/http/tests/security/xssAuditor/script-tag-post-redirect.html
new file mode 100644
index 0000000000000000000000000000000000000000..cd1da2786cbdc9d12c95ed245e878b2edf67d0c8
--- /dev/null
+++ b/LayoutTests/http/tests/security/xssAuditor/script-tag-post-redirect.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.dumpChildFramesAsText();
+ testRunner.setXSSAuditorEnabled(true);
+ testRunner.waitUntilDone();
+}
+</script>
+</head>
+<body>
+<p>Test for use of original post body in redirect. If the auditor fires,
+we've got a false positive from that.</p>
+<iframe name="tg" src="about:blank"></iframe>
+<form target="tg" method="POST" id="theForm"
+ action="resources/redir.php?url=http://localhost:8000/security/xssAuditor/resources/static-script.html%3fdecoy=<script>">
+<input type="text" name="yourname" value="hunter"/>
+<input type="text" name="required for activation" value="&lt;&gt;"/>
+</form>
+<script>
+document.getElementById('theForm').submit();
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698