implement anti-csrf measures in all posted forms

This commit is contained in:
2020-05-22 16:04:47 -05:00
parent 2b0ff06ec8
commit fd7dd7390f
5 changed files with 35 additions and 6 deletions

View File

@ -24,6 +24,7 @@
<form id="delete_action" method="post">
<input type="hidden" name="delete" value="True"/>
<input type="hidden" name="are_you_sure" value="True"/>
<input type="hidden" name="csrf-token" value="{{ csrf_token }}"/>
<input type="submit" class="form-submit-link" value="Yes, Delete">
</form>
</div>
@ -79,6 +80,7 @@
<label class="align" for="delete_action">Actions</label>
<form id="delete_action" method="post">
<input type="hidden" name="delete" value="True"/>
<input type="hidden" name="csrf-token" value="{{ csrf_token }}"/>
<input type="submit" class="form-submit-link" value="Delete...">
</form>
</div>

View File

@ -37,6 +37,7 @@
{% else %}
<form method="post">
<input type="hidden" name="csrf-token" value="{{ csrf_token }}"/>
<div class="row justify-start">
<label class="align" for="size">Capsul Size</label>
<select id="size" name="size">

View File

@ -13,6 +13,7 @@
<form method="post">
<input type="hidden" name="method" value="DELETE"></input>
<input type="hidden" name="name" value="{{ ssh_public_key['name'] }}"></input>
<input type="hidden" name="csrf-token" value="{{ csrf_token }}"/>
<div class="row">
<span class="code">{{ ssh_public_key['name'] }}</span>
<span class="dim">{{ ssh_public_key['content'] }}</span>
@ -28,6 +29,7 @@
</div>
<form method="post">
<input type="hidden" name="method" value="POST"></input>
<input type="hidden" name="csrf-token" value="{{ csrf_token }}"/>
<div class="row justify-start">
<label class="align" for="content">File Contents</label>
<textarea class="expand" id="content" name="content"></textarea>