From 16a789bf0c747d66a74e7edaf89202e3304c7271 Mon Sep 17 00:00:00 2001 From: Steven Loria Date: Wed, 8 Mar 2017 20:20:58 -0500 Subject: [PATCH] Enable csrf protection on register form Closes #34 --- .../{{cookiecutter.app_name}}/public/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/public/views.py b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/public/views.py index 72b3366..8fe92e3 100644 --- a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/public/views.py +++ b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/public/views.py @@ -46,7 +46,7 @@ def logout(): @blueprint.route('/register/', methods=['GET', 'POST']) def register(): """Register new user.""" - form = RegisterForm(request.form, csrf_enabled=False) + form = RegisterForm(request.form) if form.validate_on_submit(): User.create(username=form.username.data, email=form.email.data, password=form.password.data, active=True) flash('Thank you for registering. You can now log in.', 'success')