Add CSRF tokens to forms
This commit is contained in:
parent
dde9d9ce15
commit
becdbf38ed
3 changed files with 7 additions and 1 deletions
|
@ -32,7 +32,9 @@
|
|||
|
||||
<div class="dropdown-menu" aria-labelledby="currentUserNavbarDropdown">
|
||||
<form method="post" action="/sign_out">
|
||||
<input name="_method" type="hidden" value="delete">
|
||||
<input type="hidden" name="_method" value="delete"/>
|
||||
<input type="hidden" name="authenticity_token" value="{{ csrf_token }}"/>
|
||||
|
||||
<button type="submit" class="dropdown-item">
|
||||
Sign Out
|
||||
</button>
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
<h1>Sign In</h1>
|
||||
|
||||
<form method="post" action="/sign_in">
|
||||
<input type="hidden" name="authenticity_token" value="{{ csrf_token }}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="username">Username</label>
|
||||
<input id="username" name="username" type="text" class="form-control" placeholder="Username"/>
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
<h1>Sign Up</h1>
|
||||
|
||||
<form method="post" action="/sign_up">
|
||||
<input type="hidden" name="authenticity_token" value="{{ csrf_token }}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="username">Username</label>
|
||||
<input id="username" name="username" type="text" class="form-control" placeholder="Username"/>
|
||||
|
|
Reference in a new issue