Add initial support for CSRF token protection
This commit is contained in:
parent
11e78adaab
commit
ab09314ed3
8 changed files with 61 additions and 6 deletions
|
@ -1,6 +1,7 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<div class="form">
|
||||
${h.form(form.action_url, id=form.id or None, method='post', enctype='multipart/form-data')}
|
||||
${form.csrf_token()}
|
||||
|
||||
${form.render_fields()|n}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
<div class="form">
|
||||
${form.begin(**{'data-ajax': 'false'})}
|
||||
${form.hidden('referrer', value=referrer)}
|
||||
${form.csrf_token()}
|
||||
|
||||
${form.field_div('username', form.text('username'))}
|
||||
${form.field_div('password', form.password('password'))}
|
||||
|
|
|
@ -326,6 +326,7 @@
|
|||
|
||||
<div class="form-wrapper">
|
||||
${form.begin(id='receiving-form')}
|
||||
${form.csrf_token()}
|
||||
${h.hidden('mode')}
|
||||
${h.hidden('expiration_date')}
|
||||
${h.hidden('ordered_product')}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue