djangodocs.org

309 sections across all versions Narrow to Django 6.0 (current) →

Format change

Release notes Django 4.0 release notes

Values in the CSRF_TRUSTED_ORIGINS setting must include the scheme (e.g. 'http://' or 'https://') instead of only the hostname. Also, values that started with a dot, must now also include an asterisk before the dot. For example, change '.example.com' to 'https://*.example.com'.

dev

Release notes Django 4.0 release notes

As CSRF protection now consults the Origin header, you may need to set CSRF_TRUSTED_ORIGINS, particularly if you allow requests from subdomains by setting CSRF_COOKIE_DOMAIN (or SESSION_COOKIE_DOMAIN if CSRF_USE_SESSIONS is enabled) to a value starting with a dot.

dev

Format change

Release notes Django 4.0 release notes Backwards incompatible changes in 4.0CSRF_TRUSTED_ORIGINS changes

Values in the CSRF_TRUSTED_ORIGINS setting must include the scheme (e.g. 'http://' or 'https://') instead of only the hostname. Also, values that started with a dot, must now also include an asterisk before the dot. For example, change '.example.com' to 'https://*.example.com'.

4.2 5.0 5.1 5.2 6.0

Release notes Django 4.0 release notes Backwards incompatible changes in 4.0CSRF_TRUSTED_ORIGINS changes

As CSRF protection now consults the Origin header, you may need to set CSRF_TRUSTED_ORIGINS, particularly if you allow requests from subdomains by setting CSRF_COOKIE_DOMAIN (or SESSION_COOKIE_DOMAIN if CSRF_USE_SESSIONS is enabled) to a value starting with a dot.

4.2 5.0 5.1 5.2 6.0

Other improvements

Release notes Django 1.1 release notes

Other new features and changes introduced since Django 1.0 include: The CSRF protection middleware has been split into two classes – CsrfViewMiddleware checks incoming requests, and CsrfResponseMiddleware processes outgoing responses.

dev

Other improvements

Release notes Django 1.1 release notes What’s new in Django 1.1

Other new features and changes introduced since Django 1.0 include: The CSRF protection middleware has been split into two classes – CsrfViewMiddleware checks incoming requests, and CsrfResponseMiddleware processes outgoing responses.

4.2 5.0 5.1 5.2 6.0

Minor features

Release notes Django 1.6 release notes

Authentication backends can raise PermissionDenied to immediately fail the authentication chain. The HttpOnly flag can be set on the CSRF cookie with CSRF_COOKIE_HTTPONLY. The assertQuerysetEqual() now checks for undefined order and raises ValueError if undefined order is spotted.

dev

Minor features

Release notes Django 1.6 release notes What’s new in Django 1.6

Authentication backends can raise PermissionDenied to immediately fail the authentication chain. The HttpOnly flag can be set on the CSRF cookie with CSRF_COOKIE_HTTPONLY. The assertQuerysetEqual() now checks for undefined order and raises ValueError if undefined order is spotted.

4.2 5.0 5.1 5.2 6.0

Miscellaneous

Release notes Django 1.11 release notes

CSRF failures are logged to the django.security.csrf logger instead of django.request. ALLOWED_HOSTS validation is no longer disabled when running tests. If your application includes tests with custom host names, you must include those host names in ALLOWED_HOSTS.

dev

Overview

Release notes Django 1.2 release notes

Vastly improved protection against Cross-Site Request Forgery (CSRF). A new user “messages” framework with support for cookie- and session-based message for both anonymous and authenticated users. Hooks for object-level permissions, permissions for anonymous users, and more flexible username requirements.

dev

SameSite cookies

Release notes Django 2.1 release notes

The cookies used for django.contrib.sessions, django.contrib.messages, and Django’s CSRF protection now set the SameSite flag to Lax by default. Browsers that respect this flag won’t send these cookies on cross-origin requests.

dev