Last active
August 6, 2016 11:39
-
-
Save EverfreeFaerie/9ae10e2f3ba53b283fca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>XSS-Example</title> | |
</head> | |
<body> | |
<?php if(isset($_GET['text'])) { ?> | |
<p>You typed: <?php echo $_GET['text']; ?></p> | |
<?php } ?> | |
<form> | |
<textarea name="text"></textarea> | |
<input type="submit"/> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
THIS IS HOW NOT TO PUT USER INPUT INTO RESPONSE!
Try it by submitting
<script>alert('XSS');</script>
to the form.