URL patterns should be anchored. SEC-367

Some notes:

* The completion API was pulled out into a new repo, but left behind a
  url() entry.  That entry used a different namespace than the
  pulled-out repo, so I had to fix the one place we used the namespace.

* Two urls couldn't be anchored because they broke tests:

    url(r'users/(?P<user_id>\w+)/followed$', views.followed_threads, name='followed_threads'),
    url(r'users/(?P<user_id>\w+)$', views.user_profile, name='user_profile'),
This commit is contained in:
Ned Batchelder
2019-04-22 13:41:31 -04:00
parent 5d77bc7bcc
commit 2171ddb9df
10 changed files with 50 additions and 53 deletions

View File

@@ -15,7 +15,7 @@ class AnnouncementsConfig(AppConfig):
PluginURLs.CONFIG: {
ProjectType.LMS: {
PluginURLs.NAMESPACE: u'announcements',
PluginURLs.REGEX: u'announcements/',
PluginURLs.REGEX: u'^announcements/',
PluginURLs.RELATIVE_PATH: u'urls',
}
},