#33526: Accept truthy/falsy values in security checks.
-------------------------------------+-------------------------------------
Reporter: Will Holmes | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Core (System | Version: 4.0
checks) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* status: new => closed
* resolution: => wontfix
Comment:
Thanks for the ticket. Accepting a truthy/falsey values is risky and can
be confusing e.g. what would you expect by setting `export
SECURE_SSL_REDIRECT=0`?
{{{
>>> os.environ.get('SECURE_SSL_REDIRECT')
'0'
>>> bool(os.environ.get('SECURE_SSL_REDIRECT'))
True
}}}
I prepared [https://github.com/django/django/pull/15443 PR] to make
`CSRF_COOKIE_SECURE`/`SESSION_COOKIE_SECURE` no longer pass on truthy
values.
--
Ticket URL: <https://code.djangoproject.com/ticket/33526#comment:1>
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/063.18867098a5e4ad94a74fe7f51a65f93c%40djangoproject.com.