Skip to content

Commit

Permalink
makes the profile urls.py entry way more restrictive (#5454)
Browse files Browse the repository at this point in the history
* makes profile regex MUCH more discerning

* makes profile regex MUCH more discerning

* fix regex for slash
  • Loading branch information
owocki authored and danlipert committed Nov 6, 2019
1 parent ac17caf commit 974a43a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,9 @@
]

urlpatterns += [
re_path(r'^(.*)/(.*)?', dashboard.views.profile, name='profile_min_by_tab'),
re_path(r'^(.*)', dashboard.views.profile, name='profile_min'),
re_path(r'^([a-z|A-Z|0-9|\.](?:[a-z\d]|-(?=[a-z\d]))+)/([a-z|A-Z|0-9|\.]+)/?$', dashboard.views.profile, name='profile_min'),

re_path(r'^([a-z|A-Z|0-9|\.](?:[a-z\d]|-(?=[a-z\d]))+)/?$', dashboard.views.profile, name='profile_min'),
]

handler403 = 'retail.views.handler403'
Expand Down

0 comments on commit 974a43a

Please sign in to comment.