summaryrefslogtreecommitdiff
path: root/django/utils/log.py
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/utils/log.py
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/utils/log.py')
-rw-r--r--django/utils/log.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/django/utils/log.py b/django/utils/log.py
index a9b62caae1..2abf7701cb 100644
--- a/django/utils/log.py
+++ b/django/utils/log.py
@@ -63,6 +63,11 @@ DEFAULT_LOGGING = {
'level': 'ERROR',
'propagate': False,
},
+ 'django.security': {
+ 'handlers': ['mail_admins'],
+ 'level': 'ERROR',
+ 'propagate': False,
+ },
'py.warnings': {
'handlers': ['console'],
},