From: jordan Date: Mon, 18 Apr 2011 17:28:53 +0000 (+0000) Subject: enabling the CSRF protection middleware and adding the {% csrf_token %} tag to the... X-Git-Tag: live~325 X-Git-Url: https://git.openstreetmap.org/osqa.git/commitdiff_plain/5737916435bfeaec27dfd64af918bd8c7ae6ac0f enabling the CSRF protection middleware and adding the {% csrf_token %} tag to the forms, now OSQA is protected from Cross Site Request Forgery attacks git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@988 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/skins/default/templates/answer_edit.html b/forum/skins/default/templates/answer_edit.html index 985addd..9409f0d 100644 --- a/forum/skins/default/templates/answer_edit.html +++ b/forum/skins/default/templates/answer_edit.html @@ -63,7 +63,8 @@
-
+ + {% csrf_token %}
{% if revision_form.revision.errors %}{{ revision_form.revision.errors.as_ul }}{% endif %}
diff --git a/forum/skins/default/templates/ask.html b/forum/skins/default/templates/ask.html index 26f5fae..f2b5b53 100644 --- a/forum/skins/default/templates/ask.html +++ b/forum/skins/default/templates/ask.html @@ -94,6 +94,7 @@
+ {% csrf_token %} {% if not request.user.is_authenticated %}
{% trans "You are welcome to start submitting your question anonymously." %} diff --git a/forum/skins/default/templates/auth/auth_settings.html b/forum/skins/default/templates/auth/auth_settings.html index 8b52019..969036d 100644 --- a/forum/skins/default/templates/auth/auth_settings.html +++ b/forum/skins/default/templates/auth/auth_settings.html @@ -27,6 +27,7 @@ {% endif %}
+ {% csrf_token %}
    {{form.as_ul}}
diff --git a/forum/skins/default/templates/auth/complete.html b/forum/skins/default/templates/auth/complete.html index 5b293eb..79f10dc 100644 --- a/forum/skins/default/templates/auth/complete.html +++ b/forum/skins/default/templates/auth/complete.html @@ -34,6 +34,7 @@