From 9b682ee6ebe8d1bd8c0bb6d2bd6489ff12af3341 Mon Sep 17 00:00:00 2001 From: vincent porte Date: Mon, 18 Sep 2023 16:15:17 +0200 Subject: [PATCH] Content Security and Permission Policies - use csp_nonce in templates --- .../partials/posts_list.html | 4 +-- .../partials/topic_detail_actions.html | 29 ++++++++++--------- .../partials/topic_likes.html | 14 ++++----- lacommunaute/templates/layouts/base.html | 14 +++++---- lacommunaute/templates/pages/home.html | 28 +++++++++--------- .../templates/pages/statistiques.html | 2 +- 6 files changed, 47 insertions(+), 44 deletions(-) diff --git a/lacommunaute/templates/forum_conversation/partials/posts_list.html b/lacommunaute/templates/forum_conversation/partials/posts_list.html index 3abd1681c..b551d7c48 100644 --- a/lacommunaute/templates/forum_conversation/partials/posts_list.html +++ b/lacommunaute/templates/forum_conversation/partials/posts_list.html @@ -9,7 +9,7 @@
{% for post in posts %}
+ id="certifiedpostsarea{{post.pk}}">
@@ -38,7 +38,7 @@
- diff --git a/lacommunaute/templates/forum_conversation/partials/topic_detail_actions.html b/lacommunaute/templates/forum_conversation/partials/topic_detail_actions.html index 295eff281..09e905812 100644 --- a/lacommunaute/templates/forum_conversation/partials/topic_detail_actions.html +++ b/lacommunaute/templates/forum_conversation/partials/topic_detail_actions.html @@ -19,16 +19,16 @@ {% if posts_count > 1 %} @@ -66,8 +66,9 @@ {% endif %} - diff --git a/lacommunaute/templates/forum_conversation/partials/topic_likes.html b/lacommunaute/templates/forum_conversation/partials/topic_likes.html index 539693e33..1be8729c3 100644 --- a/lacommunaute/templates/forum_conversation/partials/topic_likes.html +++ b/lacommunaute/templates/forum_conversation/partials/topic_likes.html @@ -5,12 +5,12 @@ {% with topic.likes as counter %} {% if user.is_authenticated %} @@ -22,6 +22,6 @@ {% endwith %}
- diff --git a/lacommunaute/templates/layouts/base.html b/lacommunaute/templates/layouts/base.html index 7685ddee0..f2172f3b3 100644 --- a/lacommunaute/templates/layouts/base.html +++ b/lacommunaute/templates/layouts/base.html @@ -13,6 +13,8 @@ + + @@ -102,8 +104,8 @@ {% block js %} {% import_static_JS_theme_inclusion %} - - + - + {% if COMMU_ENVIRONMENT == 'PROD' %} - + {% endif %} - + {% endblock %} diff --git a/lacommunaute/templates/pages/home.html b/lacommunaute/templates/pages/home.html index aa2bb8ffe..a64f265b1 100644 --- a/lacommunaute/templates/pages/home.html +++ b/lacommunaute/templates/pages/home.html @@ -64,10 +64,10 @@

{% for topic in topics_public %}
  • + class="matomo-event btn-link stretched-link" + data-matomo-category="engagement" + data-matomo-action="view" + data-matomo-option="topic"> {{ topic.subject }}
  • @@ -89,10 +89,10 @@

    {% for forum in forums_category %}
  • + class="matomo-event btn-link stretched-link" + data-matomo-category="engagement" + data-matomo-action="view" + data-matomo-option="forum"> [{{ forum.parent.name }}] {{ forum.name }}
  • @@ -114,10 +114,10 @@

    {% for topic in topics_newsfeed %}
  • + class="matomo-event btn-link stretched-link" + data-matomo-category="engagement" + data-matomo-action="view" + data-matomo-option="news"> {{ topic.subject }}
  • @@ -134,8 +134,8 @@

    {% block extra_js %} {{ block.super }} - - + -