new router patch fixes runaway vulnerability, thanks Jonathan
This commit is contained in:
@@ -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
@@ -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
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user