new router patch fixes runaway vulnerability, thanks Jonathan

This commit is contained in:
mdipierro
2012-11-27 11:29:36 -06:00
parent 25f16b5315
commit fabc3a5db1
3 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.2.1 (2012-11-27 10:16:40) stable
Version 2.2.1 (2012-11-27 11:28:54) stable
+7 -2
View File
@@ -75,8 +75,13 @@ def _router_default():
exclusive_domain=False,
map_hyphen=False,
acfe_match=r'\w+$', # legal app/ctlr/fcn/ext
file_match=r'([-+=@$%\w]+[./]?)+$', # legal static subpath
args_match=r'([\w@ -]|(?<=[\w@ -])[.=])*$', # legal arg in args
#
# Implementation note:
# The file_match & args_match patterns use look-behind to avoid
# pathological backtracking from nested patterns.
#
file_match = r'([-+=@$%\w]|(?<=[-+=@$%\w])[./])*$', # legal static subpath
args_match=r'([\w@ -]|(?<=[\w@ -])[.=])*$', # legal arg in args
)
return router
+2 -2
View File
@@ -89,8 +89,8 @@
# domains = None,
# map_hyphen = False,
# acfe_match = r'\w+$', # legal app/ctlr/fcn/ext
# file_match = r'([-+=@$%\w]+[./]?)+$', # legal static subpath
# args_match = r'([\w@ -]+[=.]?)+$', # legal arg in args
# file_match = r'([-+=@$%\w]|(?<=[-+=@$%\w])[./])*$', # legal static subpath
# args_match = r'([\w@ -]|(?<=[\w@ -])[.=])*$', # legal arg in args
# )
#
# See rewrite.map_url_in() and rewrite.map_url_out() for implementation details.