mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
Filter out "content" and "secret" from exceptions.
(imported from commit 31206f528fc93746133ebe2d9234b6ce0b88cf3b)
This commit is contained in:
10
zephyr/filters.py
Normal file
10
zephyr/filters.py
Normal 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
|
||||
Reference in New Issue
Block a user