From e9b76013c3fa4cff84acbc602086c93ac797c268 Mon Sep 17 00:00:00 2001
From: Sindre Stephansen
Date: Tue, 10 Mar 2020 11:31:40 +0100
Subject: [PATCH] Implement CSRF protection
Fixes #16
---
src/app/templates/apply.html | 15 +++++-----
src/app/templates/login.html | 9 +++---
src/app/templates/new_project.html | 1 +
src/app/templates/project.html | 5 ++--
src/app/templates/register.html | 3 +-
src/app/views/app.py | 9 +++---
src/app/views/apply.py | 15 +++++-----
src/app/views/login.py | 3 +-
src/app/views/new_project.py | 48 +++++++++++++++---------------
src/app/views/project.py | 14 ++++-----
src/app/views/register.py | 12 ++++----
src/app/views/utils.py | 48 +++++++++++++++++++++++++++---
12 files changed, 114 insertions(+), 68 deletions(-)
diff --git a/src/app/templates/apply.html b/src/app/templates/apply.html
index 0bc9776..0b61e04 100644
--- a/src/app/templates/apply.html
+++ b/src/app/templates/apply.html
@@ -6,9 +6,9 @@ $def with (nav, apply_form, get_apply_permission_form, project, applicants, perm
-
+
-
+
$:nav
Apply for this project
@@ -19,8 +19,9 @@ $def with (nav, apply_form, get_apply_permission_form, project, applicants, perm
Description: $project[4]
Status: $project[5]
-
+
-
-
\ No newline at end of file
+
+
+
-
+
$:nav
$if not session.username:
Log In
+
$else:
Logged in as $session.username
-
+
$:message
-