Last active
August 31, 2018 09:20
-
-
Save athiththan11/5e1b1124166699f2a9b88300d696c24c to your computer and use it in GitHub Desktop.
CSRF Double Submit Cookies Pattern Form
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
<!-- csrf form --> | |
<form class="mt-3 mb-3" action="/src/service.php" method="POST" onSubmit="appendToken()"> | |
<!-- csrf hidden input field --> | |
<input type="hidden" id="csrf_token" name="csrf_token" value="csrf" /> | |
<div class="form-group"> | |
<label for="php">Do you like PHP ?</label> | |
<input type="text" class="form-control" id="php" name="php" placeholder="not at all... ;) " required autofocus/> | |
</div> | |
<div class="form-group"> | |
<label for="demo">Do you like this demo ?</label> | |
<input type="text" class="form-control" id="demo" name="demo" placeholder="waiting for your answer .... :D" required/> | |
</div> | |
<button type="submit" class="btn btn-success btn-block mt-5" name="verify">Submit</button> | |
</form> | |
<!-- End csrf form --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment