From d4ebdc5b974e9478b2cd41a6948d031c2222c5b4 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 28 Jan 2012 17:48:34 -0600 Subject: Support more characters in package names Fixes FS#28106, where we couldn't view packages with names containing the '@' symbol. Rather than whitelist things, switch to a blacklist of only a space and slash character. Signed-off-by: Dan McGee --- packages/urls.py | 4 ++-- packages/urls_groups.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/urls.py b/packages/urls.py index 1f25e3fd..6c616297 100644 --- a/packages/urls.py +++ b/packages/urls.py @@ -30,10 +30,10 @@ (r'^(?P[A-z0-9\-+.]+)/$', 'details'), - (r'^(?P[A-z0-9\-]+)/(?P[A-z0-9\-+.]+)/$', + (r'^(?P[A-z0-9\-]+)/(?P[^ /]+)/$', 'details'), # canonical package url. subviews defined above - (r'^(?P[A-z0-9\-]+)/(?P[A-z0-9]+)/(?P[A-z0-9\-+.]+)/', + (r'^(?P[A-z0-9\-]+)/(?P[A-z0-9]+)/(?P[^ /]+)/', include(package_patterns)), ) diff --git a/packages/urls_groups.py b/packages/urls_groups.py index c561e50d..d609944b 100644 --- a/packages/urls_groups.py +++ b/packages/urls_groups.py @@ -3,7 +3,7 @@ urlpatterns = patterns('packages.views', (r'^$', 'groups', {}, 'groups-list'), (r'^(?P[A-z0-9]+)/$', 'groups'), - (r'^(?P[A-z0-9]+)/(?P[A-z0-9\-+.]+)/$', 'group_details'), + (r'^(?P[A-z0-9]+)/(?P[^ /]+)/$', 'group_details'), ) # vim: set ts=4 sw=4 et: -- cgit v1.2.3-54-g00ecf