summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source
diff options
context:
space:
mode:
authorCasey Hancock <crh431@gmail.com>2014-08-11 18:52:20 +0200
committerCasey Hancock <crh431@gmail.com>2014-08-11 18:52:20 +0200
commit2f4c3bc5c2fac164d1c58ac9aaa09ae070687443 (patch)
tree521444d05bbf0dbb43f589228402a26907e5fb41 /user_guide_src/source
parent09546edca0645af6002caa00a2f9b7eaaae38f17 (diff)
CSRF whitelist supports regex
Signed-off-by: Casey Hancock <crh431@gmail.com>
Diffstat (limited to 'user_guide_src/source')
-rw-r--r--user_guide_src/source/changelog.rst2
-rw-r--r--user_guide_src/source/libraries/security.rst6
2 files changed, 7 insertions, 1 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 2ed2275ac..2d523e932 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -507,7 +507,7 @@ Release Date: Not Released
- Added method ``strip_image_tags()``.
- Added ``$config['csrf_regeneration']``, which makes token regeneration optional.
- - Added ``$config['csrf_exclude_uris']``, which allows you list URIs which will not have the CSRF validation methods run.
+ - Added ``$config['csrf_exclude_uris']``, which allows you list URIs which will not have the CSRF validation methods run. Optionally allows regex.
- Modified method ``sanitize_filename()`` to read a public ``$filename_bad_chars`` property for getting the invalid characters list.
- Return status code of 403 instead of a 500 if CSRF protection is enabled but a token is missing from a request.
diff --git a/user_guide_src/source/libraries/security.rst b/user_guide_src/source/libraries/security.rst
index fb875a0d9..566924398 100644
--- a/user_guide_src/source/libraries/security.rst
+++ b/user_guide_src/source/libraries/security.rst
@@ -97,6 +97,12 @@ by editing the 'csrf_exclude_uris' config parameter::
$config['csrf_exclude_uris'] = array('api/person/add');
+Optionally, you can use regular expressions as well as the ':any' and ':num'
+wildcards in the URIs::
+
+ $config['csrf_exclude_uris'] = array('api/record/:num','api/title/[a-zA-Z]+');
+
+
***************
Class Reference
***************