summaryrefslogtreecommitdiff
path: root/docs/narr/viewconfig.rst
diff options
context:
space:
mode:
authorBert JW Regeer <xistence@0x58.com>2016-04-15 16:39:16 -0600
committerBert JW Regeer <xistence@0x58.com>2016-04-15 16:39:16 -0600
commitd534c450deeb0163629d7993f6faf12a97b2813c (patch)
tree378c537494498bf517562e41baccb8ce43a8145b /docs/narr/viewconfig.rst
parentbf33b200bbb72114ca55150724b0a4c51d7ef535 (diff)
parent21d5beaed1641e1f50ab1ab3c481b1c8f3ad1173 (diff)
downloadpyramid-d534c450deeb0163629d7993f6faf12a97b2813c.tar.gz
pyramid-d534c450deeb0163629d7993f6faf12a97b2813c.tar.bz2
pyramid-d534c450deeb0163629d7993f6faf12a97b2813c.zip
Merge pull request #2500 from dstufft/improve-csrf
Increase the protection provided by the CSRF checks
Diffstat (limited to 'docs/narr/viewconfig.rst')
-rw-r--r--docs/narr/viewconfig.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/narr/viewconfig.rst b/docs/narr/viewconfig.rst
index e645185f5..3b8f0353a 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`.
@@ -459,7 +460,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