summaryrefslogtreecommitdiff
path: root/docs/narr/viewconfig.rst
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2016-04-16 14:13:20 -0700
committerSteve Piercy <web@stevepiercy.com>2016-04-16 14:13:20 -0700
commitfa4a340443b540ce2e0f10f53b104ac006f8e60e (patch)
tree4e55ecc6133ad1f4508839931be2fc0f8773005b /docs/narr/viewconfig.rst
parent88eebf18615d7b301bc443b6da031768bba9a831 (diff)
parent401c6513dc53b783b1d2ab7c88dd56e8b8bb188b (diff)
downloadpyramid-fa4a340443b540ce2e0f10f53b104ac006f8e60e.tar.gz
pyramid-fa4a340443b540ce2e0f10f53b104ac006f8e60e.tar.bz2
pyramid-fa4a340443b540ce2e0f10f53b104ac006f8e60e.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'docs/narr/viewconfig.rst')
-rw-r--r--docs/narr/viewconfig.rst14
1 files changed, 9 insertions, 5 deletions
diff --git a/docs/narr/viewconfig.rst b/docs/narr/viewconfig.rst
index e645185f5..cd5b8feb0 100644
--- a/docs/narr/viewconfig.rst
+++ b/docs/narr/viewconfig.rst
@@ -195,10 +195,11 @@ Non-Predicate Arguments
``require_csrf``
- CSRF checks only affect POST requests. Any other request methods will pass
- untouched. This option is used in combination with the
- ``pyramid.require_default_csrf`` setting to control which request parameters
- are checked for CSRF tokens.
+ CSRF checks will affect any request method that is not defined as a "safe"
+ method by RFC2616. In pratice this means that GET, HEAD, OPTIONS, and TRACE
+ methods will pass untouched and all others methods will require CSRF. This
+ option is used in combination with the ``pyramid.require_default_csrf``
+ setting to control which request parameters are checked for CSRF tokens.
This feature requires a configured :term:`session factory`.
@@ -214,6 +215,9 @@ Non-Predicate Arguments
If this option is set to ``False`` then CSRF checks will be disabled
regardless of the ``pyramid.require_default_csrf`` setting.
+ In addition, if this option is set to ``True`` or a string then CSRF origin
+ checking will be enabled.
+
See :ref:`auto_csrf_checking` for more information.
.. versionadded:: 1.7
@@ -459,7 +463,7 @@ configured view.
check name.
If CSRF checking is performed, the checked value will be the value of
- ``request.params[check_name]``. This value will be compared against the
+ ``request.POST[check_name]``. This value will be compared against the
value of ``request.session.get_csrf_token()``, and the check will pass if
these two values are the same. If the check passes, the associated view will
be permitted to execute. If the check fails, the associated view will not be