Merge pull request #20286 from edx/nedbat/sec-367

URL patterns should be anchored. SEC-367
This commit is contained in:
Ned Batchelder
2019-05-01 08:25:05 -04:00
committed by GitHub
10 changed files with 50 additions and 53 deletions

View File

@@ -20,7 +20,7 @@ class BookmarksConfig(AppConfig):
PluginURLs.CONFIG: {
ProjectType.LMS: {
PluginURLs.NAMESPACE: u'',
PluginURLs.REGEX: u'api/bookmarks/',
PluginURLs.REGEX: u'^api/bookmarks/',
PluginURLs.RELATIVE_PATH: u'urls',
}
},

View File

@@ -3,7 +3,7 @@ from django.apps import AppConfig
from openedx.core.djangoapps.plugins.constants import ProjectType, PluginURLs
plugin_urls_config = {PluginURLs.NAMESPACE: u'theming', PluginURLs.REGEX: u'theming/'}
plugin_urls_config = {PluginURLs.NAMESPACE: u'theming', PluginURLs.REGEX: r'^theming/'}
class ThemingConfig(AppConfig):

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',
}
},

View File

@@ -31,7 +31,7 @@ class CompletionBatchTestCase(CompletionWaffleTestMixin, ModuleStoreTestCase):
Create the test data.
"""
super(CompletionBatchTestCase, self).setUp()
self.url = reverse('completion_api:v1:completion-batch')
self.url = reverse('completion:v1:completion-batch')
# Enable the waffle flag for all tests
self.override_waffle_switch(True)