Index: LayoutTests/http/tests/security/xssAuditor/resources/echo-intertag.pl |
diff --git a/LayoutTests/http/tests/security/xssAuditor/resources/echo-intertag.pl b/LayoutTests/http/tests/security/xssAuditor/resources/echo-intertag.pl |
index b2407deb4e4f6ed6bc9f8ad138f64aa8b3011a81..b790d513878ad393e9b2ce3026ba97b59d7f5b7f 100755 |
--- a/LayoutTests/http/tests/security/xssAuditor/resources/echo-intertag.pl |
+++ b/LayoutTests/http/tests/security/xssAuditor/resources/echo-intertag.pl |
@@ -92,7 +92,11 @@ if ($cgi->param('inHead')) { |
if ($cgi->param('replaceState')) { |
print "<script>history.replaceState({}, '', '#must-not-appear');</script>\n"; |
} |
-print $cgi->param('q'); # XSS reflected here. |
+my $reflection = $cgi->param('q'); |
+my $pattern = "\xfe"; |
+my $replacement = "?"; |
+$reflection =~ s/$pattern/$replacement/g; # pretend server translates high character 0xfe into literal "?". |
+print $reflection; # XSS reflected here. |
if ($cgi->param('script-expression-follows')) { |
print "\n <script>42;</script>\n"; |
} |