Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SHA-384 SubRequest Integrity check (SRI Hash) for CDNs #200

Merged
merged 3 commits into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions cm_main/templates/cm_main/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}{% title _("Home") %}{% endblock %}</title>
{# bulma stylesheet #}
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bulma@1.0.1/css/bulma.min.css">
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bulma@1.0.2/css/bulma.min.css"
integrity="sha384-tl5h4XuWmVzPeVWU0x8bx0j/5iMwCBduLEgZ+2lH4Wjda+4+q3mpCww74dgAB3OX"
crossorigin="anonymous">
{# material design icons #}
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@mdi/font@7.4.47/css/materialdesignicons.min.css">
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@mdi/font@7.4.47/css/materialdesignicons.min.css"
integrity="sha384-HphS8cQyN+eYiJ5PMbzShG6qZdRtvHPVLPkYb8JwMkmNgaIxrFVDhQe3jIbq3EZ2"
crossorigin="anonymous">
{# jquery #}
<script src="https://code.jquery.com/jquery-3.7.1.min.js"
integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo="
integrity="sha384-1H217gwSVyLSIfaLxHbE7dRb3v4mYCKbpQvzx0cegeju1MVsGrX5xXxAvs/HgeFs"
crossorigin="anonymous"></script>
{% block header %}{%endblock%}
{# cousins matter css and js#}
Expand Down Expand Up @@ -89,4 +93,4 @@
</div>
</footer>
</body>
</html>
</html>
9 changes: 7 additions & 2 deletions cm_main/templates/cm_main/common/include-select2.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"
integrity="sha384-JnbsSLBmv2/R0fUmF2XYIcAEMPHEAO51Gitn9IjL4l89uFTIgtLF1+jqIqqd9FSk"
crossorigin="anonymous"></script>
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css"
integrity="sha384-KZO2FRYNmIHerhfYMjCIUaJeGBRXP7CN24SiNSG+wdDzgwvxWbl16wMVtWiJTcMt"
crossorigin="anonymous">
10 changes: 8 additions & 2 deletions cm_main/templates/cm_main/common/include-summernote.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{% load static i18n cm_tags %}
<!-- include summernote lite css/js -->
<link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-lite.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-lite.min.js"></script>
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-lite.min.css"
integrity="sha384-ymgpfvYiIE34y8f8FHcVzcMbjc71SGbtoAl9+ku7kaYjEVbxgF2CvkrwYeGywqyd"
crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-lite.min.js"
integrity="sha384-llmpdW/XN7NR6OnZQFvy2xN3KRv+Br5lpV3IEJYCJITjcjlfdSdxb0R3hAhfPsGq"
crossorigin="anonymous"></script>
{# can't add SRI to this one as it is dynamic #}
<script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/lang/summernote-{%normalized_language_code%}.min.js"></script>
{%trans "Toggle Note Editor Toolbar" as trtoggle%}
{%trans "Remaining characters:" as trchar%}
Expand Down
Loading