Skip to content

Commit

Permalink
Added clarifying note to docs for CSRF_COOKIE_DOMAIN
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
spookylukey committed May 9, 2011
1 parent 8122ce7 commit bf7af2b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/ref/contrib/csrf.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ CSRF checks::
>>> from django.test import Client >>> from django.test import Client
>>> csrf_client = Client(enforce_csrf_checks=True) >>> csrf_client = Client(enforce_csrf_checks=True)


.. _csrf-limitations:

Limitations Limitations
=========== ===========


Expand Down
8 changes: 6 additions & 2 deletions docs/ref/settings.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -319,11 +319,15 @@ CSRF_COOKIE_DOMAIN
Default: ``None`` Default: ``None``


The domain to be used when setting the CSRF cookie. This can be useful for The domain to be used when setting the CSRF cookie. This can be useful for
allowing cross-subdomain requests to be exluded from the normal cross site easily allowing cross-subdomain requests to be exluded from the normal cross
request forgery protection. It should be set to a string such as site request forgery protection. It should be set to a string such as
``".lawrence.com"`` to allow a POST request from a form on one subdomain to be ``".lawrence.com"`` to allow a POST request from a form on one subdomain to be
accepted by accepted by a view served from another subdomain. accepted by accepted by a view served from another subdomain.


Please note that the presence of this setting does not imply that Django's CSRF
protection is safe from cross-subdomain attacks by default - please see the
:ref:`CSRF limitations <csrf-limitations>` section.

.. setting:: CSRF_COOKIE_NAME .. setting:: CSRF_COOKIE_NAME


CSRF_COOKIE_NAME CSRF_COOKIE_NAME
Expand Down

0 comments on commit bf7af2b

Please sign in to comment.