diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 57a3c2a7424a7e24617c979204e84d0176677474..a5627e57b7e0cd2655d27d30d2b1981a9dfe39e7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -17,6 +17,7 @@ dev_deploy:
- rsync -rav -e ssh --exclude='.git/' --exclude='.gitlab-ci.yml' --delete-excluded ./ amivburger@login.ee.ethz.ch:~/app_tmp
- ssh -p22 amivburger@login.ee.ethz.ch "cp ~/app/app/config.py ~/app_tmp/app/"
- ssh -p22 amivburger@login.ee.ethz.ch "mv ~/app ~/app_old && mv ~/app_tmp ~/app && chmod -R 700 ~/app"
+ - ssh -p22 amivburger@login.ee.ethz.ch "pip install -r ~/app/requirements.txt"
- ssh -p22 amivburger@login.ee.ethz.ch "touch ~/app-touch-reload.gg"
- ssh -p22 amivburger@login.ee.ethz.ch "rm -rf ~/app_old"
environment:
diff --git a/app/__init__.py b/app/__init__.py
index dffa8452be35a65ae241c82e8386a9c08ee74c13..c1c41d111fa80d33bb998a82c0269b63171bb16c 100644
--- a/app/__init__.py
+++ b/app/__init__.py
@@ -1,4 +1,5 @@
from flask import Flask, g, session
+from flask_wtf.csrf import CSRFProtect
from .models import db
from nethz.ldap import AuthenticatedLdap
@@ -11,6 +12,9 @@ app.secret_key = app.config['SECRET_KEY']
ldap_connector = AuthenticatedLdap(app.config['LDAP_USERNAME'],
app.config['LDAP_PASSWORD'])
+# Initialize CSRFProtect extension
+csrf = CSRFProtect(app)
+
# Bind SQLAlchemy to Flask app
db.init_app(app)
diff --git a/app/templates/creator.html b/app/templates/creator.html
index 07a756547c63217ce9049d2b9daa4f724c87572d..d94723723aee769bffb299266511d879cd4d8387 100644
--- a/app/templates/creator.html
+++ b/app/templates/creator.html
@@ -125,6 +125,7 @@
+
diff --git a/app/templates/vote.html b/app/templates/vote.html
index 4659f2a58047a1a3d5b03d36135032923e362e06..2e79231a5737311aa68378dc9ba6d5790db624ca 100644
--- a/app/templates/vote.html
+++ b/app/templates/vote.html
@@ -64,13 +64,17 @@