diff --git a/NEWS.rst b/NEWS.rst index 93c4526..95f2d27 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -25,6 +25,7 @@ (2012-XX-XX) * dev setup fix for Django 1.4 contributed by Rohan Jain +* missing csrf tokens in templates contributed by Richard Wackerbarth (LP: 996658) 1.0 alpha 1 -- "Space Farm" diff --git a/dev_setup/settings.py b/dev_setup/settings.py index 1e86370..4a8cd46 100644 --- a/dev_setup/settings.py +++ b/dev_setup/settings.py @@ -116,6 +116,7 @@ MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', diff --git a/src/postorius/doc/news.rst b/src/postorius/doc/news.rst index 328c5a2..7ed3acc 100644 --- a/src/postorius/doc/news.rst +++ b/src/postorius/doc/news.rst @@ -25,6 +25,7 @@ (2012-XX-XX) * dev setup fix for Django 1.4 contributed by Rohan Jain +* missing csrf tokens in templates contributed by Richard Wackerbarth (LP: 996658) 1.0 alpha 1 -- "Space Farm" diff --git a/src/postorius/templates/postorius/confirm_dialog.html b/src/postorius/templates/postorius/confirm_dialog.html index 28d0f13..4d03517 100644 --- a/src/postorius/templates/postorius/confirm_dialog.html +++ b/src/postorius/templates/postorius/confirm_dialog.html @@ -4,7 +4,7 @@ {% block main %}

{% trans 'Confirm' %}

{% trans "Are you sure?" %}

-
+ {% csrf_token %} {% trans "Cancel" %}
diff --git a/src/postorius/templates/postorius/domain_new.html b/src/postorius/templates/postorius/domain_new.html index d0e129c..df0ee90 100644 --- a/src/postorius/templates/postorius/domain_new.html +++ b/src/postorius/templates/postorius/domain_new.html @@ -4,7 +4,7 @@ {% block main %} {% include 'postorius/menu/settings_nav.html' %}

{% trans "Add a new Domain" %}

-
+ {% csrf_token %} {{ form.as_p }}
diff --git a/src/postorius/templates/postorius/lists/mass_subscribe.html b/src/postorius/templates/postorius/lists/mass_subscribe.html index fac403b..3359023 100644 --- a/src/postorius/templates/postorius/lists/mass_subscribe.html +++ b/src/postorius/templates/postorius/lists/mass_subscribe.html @@ -6,7 +6,7 @@ {% include 'postorius/menu/list_nav.html' %} {% endif %}

{% trans "Mass Subscribe" %} - {{list.fqdn_listname}}

- + {% csrf_token %} {{ form.as_p }} diff --git a/src/postorius/templates/postorius/lists/new.html b/src/postorius/templates/postorius/lists/new.html index 787b400..3e3536d 100644 --- a/src/postorius/templates/postorius/lists/new.html +++ b/src/postorius/templates/postorius/lists/new.html @@ -3,7 +3,7 @@ {% block main %}

{% trans "Create a new List" %} {{ block.super }}

-
+ {% csrf_token %} {{ form.as_p }}
diff --git a/src/postorius/templates/postorius/lists/settings.html b/src/postorius/templates/postorius/lists/settings.html index 3f6610f..98beb49 100644 --- a/src/postorius/templates/postorius/lists/settings.html +++ b/src/postorius/templates/postorius/lists/settings.html @@ -12,7 +12,7 @@ {% if visible_section %} -
+ {% csrf_token %} {{ form.as_p }}
diff --git a/src/postorius/templates/postorius/lists/subscribe.html b/src/postorius/templates/postorius/lists/subscribe.html index 76c2d48..0d7f73b 100644 --- a/src/postorius/templates/postorius/lists/subscribe.html +++ b/src/postorius/templates/postorius/lists/subscribe.html @@ -3,7 +3,7 @@ {% block main %}

{% trans 'Subscribe' %} {{ list.fqdn_listname}}

-
+ {% csrf_token %} {{form.as_p}}
diff --git a/src/postorius/templates/postorius/lists/subscriptions.html b/src/postorius/templates/postorius/lists/subscriptions.html index 08f20da..9f1ead5 100644 --- a/src/postorius/templates/postorius/lists/subscriptions.html +++ b/src/postorius/templates/postorius/lists/subscriptions.html @@ -4,7 +4,7 @@ {% block main %} {{list.list_name}} {{list.display_name}} {% if form_subscribe %} -