From d912160da8f6ab4e63ad2c89ed3274b77ba44378 Mon Sep 17 00:00:00 2001 From: pdelboca Date: Thu, 15 Jun 2023 10:24:05 +0200 Subject: [PATCH 1/3] Add csrf_input to all forms --- .../templates/admin/confirm_remove_showcase_admin.html | 1 + .../showcase/templates/admin/manage_showcase_admins.html | 1 + .../showcase/templates/package/dataset_showcase_list.html | 1 + ckanext/showcase/templates/showcase/add_datasets.html | 1 + ckanext/showcase/templates/showcase/confirm_delete.html | 1 + ckanext/showcase/templates/showcase/manage_datasets.html | 2 ++ .../showcase/templates/showcase/snippets/showcase_item.html | 6 +++++- 7 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ckanext/showcase/templates/admin/confirm_remove_showcase_admin.html b/ckanext/showcase/templates/admin/confirm_remove_showcase_admin.html index 342012b9..2f8c95fe 100644 --- a/ckanext/showcase/templates/admin/confirm_remove_showcase_admin.html +++ b/ckanext/showcase/templates/admin/confirm_remove_showcase_admin.html @@ -12,6 +12,7 @@

{{ _('Are you sure you want to remove this user as a Showcase Admin - {name}?').format(name=c.user_dict.name) }}

+ {{ h.csrf_input() if 'csrf_input' in h }} diff --git a/ckanext/showcase/templates/admin/manage_showcase_admins.html b/ckanext/showcase/templates/admin/manage_showcase_admins.html index e129f4a5..9bd679a3 100644 --- a/ckanext/showcase/templates/admin/manage_showcase_admins.html +++ b/ckanext/showcase/templates/admin/manage_showcase_admins.html @@ -12,6 +12,7 @@

{% block form %} + {{ h.csrf_input() if 'csrf_input' in h }}