summaryrefslogtreecommitdiff
path: root/pecan/routing.py
diff options
context:
space:
mode:
Diffstat (limited to 'pecan/routing.py')
-rw-r--r--pecan/routing.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pecan/routing.py b/pecan/routing.py
index 29a294c..aed8ad5 100644
--- a/pecan/routing.py
+++ b/pecan/routing.py
@@ -42,7 +42,9 @@ def route(*args):
if not isinstance(route, six.string_types):
raise TypeError('%s must be a string' % route)
- if not re.match('^[0-9a-zA-Z-_$\(\),;:]+$', route):
+ if route in ('.', '..') or not re.match(
+ '^[0-9a-zA-Z-_$\(\)\.~!,;:*+@=]+$', route
+ ):
raise ValueError(
'%s must be a valid path segment. Keep in mind '
'that path segments should not contain path separators '