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 <dan@archlinux.org>
This commit is contained in:
Dan McGee 2012-01-28 17:48:34 -06:00
parent bb570809f1
commit d4ebdc5b97
2 changed files with 3 additions and 3 deletions

View File

@ -30,10 +30,10 @@
(r'^(?P<name>[A-z0-9\-+.]+)/$',
'details'),
(r'^(?P<repo>[A-z0-9\-]+)/(?P<name>[A-z0-9\-+.]+)/$',
(r'^(?P<repo>[A-z0-9\-]+)/(?P<name>[^ /]+)/$',
'details'),
# canonical package url. subviews defined above
(r'^(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[A-z0-9\-+.]+)/',
(r'^(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[^ /]+)/',
include(package_patterns)),
)

View File

@ -3,7 +3,7 @@
urlpatterns = patterns('packages.views',
(r'^$', 'groups', {}, 'groups-list'),
(r'^(?P<arch>[A-z0-9]+)/$', 'groups'),
(r'^(?P<arch>[A-z0-9]+)/(?P<name>[A-z0-9\-+.]+)/$', 'group_details'),
(r'^(?P<arch>[A-z0-9]+)/(?P<name>[^ /]+)/$', 'group_details'),
)
# vim: set ts=4 sw=4 et: