Enable cookie security if HTTPS is explicity indicated in settings.
Per this conversation
https://forum.djangoproject.com/t/why-are-cookie-secure-settings-defaulted-to-false/
on forum.djangoproject.com with Adam Johnson, the goal of this ticket is to help improve Django's default security.
By default, SESSION_COOKIE_SECURE and CSRF_COOKIE_SECURE are set to False.
The purpose of this ticket is to set SESSION_COOKIE_SECURE and CSRF_COOKIE_SECURE to True if either SECURE_SSL_REDIRECT or SECURE_HSTS_SECONDS is enabled.
Change History
(5)
| Resolution: |
→ wontfix
|
| Status: |
new → closed
|
| Summary: |
Enable cookie security if HTTPS is explicity indicated in settings → Enable cookie security if HTTPS is explicity indicated in settings.
|
| Resolution: |
wontfix
|
| Status: |
closed → new
|
| Resolution: |
→ wontfix
|
| Status: |
new → closed
|
Thanks for this ticket, however I'm not in favor of internal rules which change settings implicitly. It can be confusing and sometimes unexpected. You can start a discussion on DevelopersMailingList if you don't agree. We can reopen this ticket after getting a strong consensus.