From 4063a40db0355f85edf1313151d51a9ba809f554 Mon Sep 17 00:00:00 2001 From: Richard Ebeling Date: Mon, 25 Sep 2023 20:29:31 +0200 Subject: [PATCH 01/12] Add mozilla-django-csp. Add CSP-nonces to everything. Inline-code is still a problem --- .../contributor_evaluation_form.html | 4 ++-- .../templates/contributor_index.html | 2 +- evap/evaluation/templates/base.html | 22 +++++++++---------- .../templates/bootstrap_datetimepicker.html | 8 +++---- .../templates/confirmation_modal.html | 2 +- .../templates/confirmation_text_modal.html | 2 +- evap/evaluation/templates/contact_modal.html | 2 +- .../templates/evap_evaluation_edit_js.html | 6 ++--- evap/evaluation/templates/faq.html | 2 +- evap/evaluation/templates/infobox.html | 4 ++-- .../templatetags/infotext_templatetags.py | 11 +++++++--- evap/grades/templates/grades_course_view.html | 2 +- .../templates/grades_semester_view.html | 6 ++--- evap/results/templates/results_index.html | 2 +- ...ewards_reward_point_redemption_events.html | 3 +-- evap/settings.py | 9 ++++++++ .../templates/staff_course_type_index.html | 4 ++-- evap/staff/templates/staff_degree_index.html | 4 ++-- .../staff_evaluation_person_management.html | 18 +++++++-------- .../staff_evaluation_textanswers_full.html | 2 +- .../staff_evaluation_textanswers_quick.html | 2 +- evap/staff/templates/staff_faq_index.html | 4 ++-- evap/staff/templates/staff_faq_section.html | 4 ++-- .../templates/staff_questionnaire_form.html | 4 ++-- .../templates/staff_questionnaire_index.html | 6 ++--- .../templates/staff_semester_export.html | 4 ++-- .../templates/staff_semester_import.html | 4 ++-- .../staff_semester_preparation_reminder.html | 2 +- evap/staff/templates/staff_semester_view.html | 20 ++++++++--------- evap/staff/templates/staff_template_form.html | 2 +- .../templates/staff_text_answer_warnings.html | 4 ++-- evap/staff/templates/staff_user_form.html | 4 ++-- evap/staff/templates/staff_user_import.html | 6 ++--- evap/staff/templates/staff_user_list.html | 2 +- evap/student/templates/student_vote.html | 6 ++--- requirements.txt | 1 + 36 files changed, 102 insertions(+), 88 deletions(-) diff --git a/evap/contributor/templates/contributor_evaluation_form.html b/evap/contributor/templates/contributor_evaluation_form.html index ecd2e22c51..2ee67c2b99 100644 --- a/evap/contributor/templates/contributor_evaluation_form.html +++ b/evap/contributor/templates/contributor_evaluation_form.html @@ -125,7 +125,7 @@ {% blocktrans asvar question%}Do you want to approve this evaluation? This will allow the evaluation team to proceed with the preparation, but you won't be able to make any further changes.{% endblocktrans %} {% trans 'Approve evaluation' as action_text %} {% include 'confirmation_modal.html' with modal_id='approveEvaluationModal' title=title question=question action_text=action_text btn_type='primary' %} - diff --git a/evap/contributor/templates/contributor_index.html b/evap/contributor/templates/contributor_index.html index e61132d2cc..9edcb30ba1 100644 --- a/evap/contributor/templates/contributor_index.html +++ b/evap/contributor/templates/contributor_index.html @@ -226,7 +226,7 @@