#36784: Add CSP support to Django's script object and media objects
-------------------------------------+-------------------------------------
Reporter: Johannes Maron | Owner: Natalia
| Bidart
Type: New feature | Status: closed
Component: Forms | Version: 6.0
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by nessita <124304+nessita@…>):
* resolution: => fixed
* status: assigned => closed
Comment:
In [changeset:"5686ce41958b21f0ae5bfa290e8d4420a6349c1b" 5686ce41]:
{{{#!CommitTicketReference repository=""
revision="5686ce41958b21f0ae5bfa290e8d4420a6349c1b"
Fixed #36784 -- Added csp_nonce_attr template tag for CSP nonce inclusion.
New default tag `{% csp_nonce_attr %}` was added for explicit CSP nonce
inclusion into `<script>` and `<link>` elements.
`{% csp_nonce_attr %}` renders `nonce="<value>"` when `csp_nonce` is
present in the template context, and renders nothing otherwise.
`{% csp_nonce_attr media %}` renders a `Media` object's assets with the
nonce attr applied to each tag.
Thanks Jacob Walls for the accurate and spot on review comments.
Co-authored-by: Johannes Maron <[email protected]>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36784#comment:45>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019dffad03dc-e6ae02bb-0f50-4720-a2dc-8f3da29a16aa-000000%40eu-central-1.amazonses.com.