summaryrefslogtreecommitdiff
path: root/django/conf/urls
diff options
context:
space:
mode:
authorPreston Holmes <preston@ptone.com>2013-05-15 16:14:28 -0700
committerPreston Holmes <preston@ptone.com>2013-05-25 16:27:34 -0700
commitd228c1192ed59ab0114d9eba82ac99df611652d2 (patch)
treee9ae061d032f269bcd3914b50ef200c1fd4a208e /django/conf/urls
parent36d47f72e300321c4a328a643d489436535d1442 (diff)
Fixed #19866 -- Added security logger and return 400 for SuspiciousOperation.
SuspiciousOperations have been differentiated into subclasses, and are now logged to a 'django.security.*' logger. SuspiciousOperations that reach django.core.handlers.base.BaseHandler will now return a 400 instead of a 500. Thanks to tiwoc for the report, and Carl Meyer and Donald Stufft for review.
Diffstat (limited to 'django/conf/urls')
-rw-r--r--django/conf/urls/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/conf/urls/__init__.py b/django/conf/urls/__init__.py
index 04fb1dff59..c0340c0543 100644
--- a/django/conf/urls/__init__.py
+++ b/django/conf/urls/__init__.py
@@ -5,8 +5,9 @@ from django.utils.importlib import import_module
from django.utils import six
-__all__ = ['handler403', 'handler404', 'handler500', 'include', 'patterns', 'url']
+__all__ = ['handler400', 'handler403', 'handler404', 'handler500', 'include', 'patterns', 'url']
+handler400 = 'django.views.defaults.bad_request'
handler403 = 'django.views.defaults.permission_denied'
handler404 = 'django.views.defaults.page_not_found'
handler500 = 'django.views.defaults.server_error'