#33180: Debug 500 HTML broken with strict Content-Security-Policy (CSP)
--------------------------------------+------------------------------------
     Reporter:  Adam Johnson          |                    Owner:  (none)
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Error reporting       |                  Version:  dev
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by Collin Anderson):

 I feel like ideally we get `Content-Security-Policy` framework added to
 core (#15727) so there's a reliable way to edit CSP headers on a per-
 response basis.

 Re moving js/css to separate file/url, Google's CSP Evaluator https://csp-
 evaluator.withgoogle.com/ (linked from
 https://infosec.mozilla.org/guidelines/web_security#content-security-
 policy) says regarding `script-src: self`:
 "Host whitelists can frequently be bypassed. Consider using 'strict-
 dynamic' in combination with CSP nonces or hashes." "'self' can be
 problematic if you host JSONP, Angular or user uploaded files."

 (There's probably pros and cons either way, as you could still have
 injection in an inline-script in a template. `script-src: self` is pretty
 popular, and `contrib.admin` relies on it being there.)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33180#comment:9>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/0107017f75d59057-d9981750-a936-43a5-9244-683823058d6d-000000%40eu-central-1.amazonses.com.

Reply via email to