Is it possible to temporarily disable the XSS protection found in modern browsers for testing purposes?
I\'m trying to explain to a co-worker what happens when one sends
You can redirect the user to another local web page when the form is submitted and print the infected data. Chrome will not detect that.
Hint: You can use sessions / cookies to store the infected data between the 2 pages.
Example in PHP:
index.php
<?php
setcookie('infected', $_POST['infected']);
if($_POST['infected'])
header('location: show.php');
?>
<form action="index.php" method="POST" />
<p>
Username: <input type="text" name="infected" />
<input type="submit" value="Add Comment" />
</p>
</form>
show.php
echo $_COOKIE['data'];