angler-fishThe Vulnerability History Project

Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default.

      This is a large change to CSRF protection for Django.  It includes:

 * removing the dependency on the session framework.
 * deprecating CsrfResponseMiddleware, and replacing with a core template tag.
 * turning on CSRF protection by default by adding CsrfViewMiddleware to
   the default value of MIDDLEWARE_CLASSES.
 * protecting all contrib apps (whatever is in settings.py)
   using a decorator.

For existing users of the CSRF functionality, it should be a seamless update,
but please note that it includes DEPRECATION of features in Django 1.1,
and there are upgrade steps which are detailed in the docs.

Many thanks to 'Glenn' and 'bthomas', who did a lot of the thinking and work
on the patch, and to lots of other people including Simon Willison and
Russell Keith-Magee who refined the ideas.

Details of the rationale for these changes is found here:

http://code.djangoproject.com
    
commit 8e70cef9b67433edd70935dcc30c621d1e7fc0a0
-2
-13
-1
+2 -7
-5
+1 -1
+1 -1
+1 -1
+1 -1
+1 -1
+1 -1
+1 -1
+1 -1
+1 -1
+1 -1
+2 -7
+1 -1
+1 -1
+1 -1
+1 -1
+1 -1
+2 -3
-4
-20
-10
+64 -192
+66 -245
-62
+1 -1
+2 -2
+3 -6
-2
+1 -9
-21
-5
-6
+1 -25
+71 -312
+1 -1
-39
-15
-7
-16
+1 -1
-1
-369
+2 -3
expand_less