Filter out "content" and "secret" from exceptions.

(imported from commit 31206f528fc93746133ebe2d9234b6ce0b88cf3b)
This commit is contained in:
Luke Faraone
2012-12-07 17:00:13 -05:00
parent ced8062509
commit 6ff666b9d7
2 changed files with 14 additions and 0 deletions

10
zephyr/filters.py Normal file
View File

@@ -0,0 +1,10 @@
from django.views.debug import SafeExceptionReporterFilter
class HumbugExceptionReporterFilter(SafeExceptionReporterFilter):
def get_post_parameters(self, request):
filtered_post = SafeExceptionReporterFilter.get_post_parameters(self, request)
if 'content' in filtered_post:
filtered_post['content'] = '**********'
if 'secret' in filtered_post:
filtered_post['secret'] = '**********'
return filtered_post