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

Unified Diff: LayoutTests/http/tests/security/xssAuditor/resources/echo-form-action.pl

Issue 1179633002: Prevent linear-time forcing of tokens by inducing XSSAuditor page blocks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Style. Created 5 years, 6 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/resources/echo-form-action.pl
diff --git a/LayoutTests/http/tests/security/xssAuditor/resources/echo-form-action.pl b/LayoutTests/http/tests/security/xssAuditor/resources/echo-form-action.pl
index ce2a8fed23108b7e77b0c5726b8d8357ce49b459..bc8a6e91d8f98034afa3a1921a9e6d6acbdd151b 100755
--- a/LayoutTests/http/tests/security/xssAuditor/resources/echo-form-action.pl
+++ b/LayoutTests/http/tests/security/xssAuditor/resources/echo-form-action.pl
@@ -3,6 +3,10 @@ use strict;
use CGI;
my $cgi = new CGI;
+my $action = $cgi->param('q');
+if ($cgi->param('add-token')) {
+ $action = $action . "&tok=12345678";
+}
print "Content-Type: text/html; charset=UTF-8\n\n";
@@ -10,7 +14,7 @@ print "<!DOCTYPE html>\n";
print "<html>\n";
print "<body>\n";
print "<p>This is an iframe with a injected form</p>\n";
-print "<form method=\"post\" id=\"login\" action=\"".$cgi->param('q')."\"></form>\n";
+print "<form method=\"post\" id=\"login\" action=\"".$action."\"></form>\n";
print "<script>if (window.testRunner) testRunner.notifyDone();</script>\n";
print "</body>\n";
print "</html>\n";

Powered by Google App Engine
This is Rietveld 408576698