From 089c3c265a2d19c4a0e4b0dbaa4a3a2c920aa2e1 Mon Sep 17 00:00:00 2001 From: matthewblain Date: Tue, 22 Mar 2016 16:08:36 -0700 Subject: [PATCH] Switch CSRF token rendering mechanism. Switch Register CSRF protect from form.hidden_tag to input hidden value=csrf_token. I don't understand why this is necessary, as form.hidden_tag works elsewhere--this may be a symptom of an aliasing issue. However, it was the solution applied to fix login in a previous commit as described in https://github.com/sloria/cookiecutter-flask/issues/34. --- .../{{cookiecutter.app_name}}/templates/public/register.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/public/register.html b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/public/register.html index 7f3f119..1b10b31 100644 --- a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/public/register.html +++ b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/public/register.html @@ -5,7 +5,7 @@

Register


- {{ form.hidden_tag() }} +
{{form.username.label}} {{form.username(placeholder="Username", class_="form-control")}}