parent
6f7998adc7
commit
1f4b9f4f1f
|
@ -67,23 +67,7 @@ def get_exception_reporter_filter(request):
|
||||||
return getattr(request, 'exception_reporter_filter', default_filter)
|
return getattr(request, 'exception_reporter_filter', default_filter)
|
||||||
|
|
||||||
|
|
||||||
class ExceptionReporterFilter:
|
class SafeExceptionReporterFilter:
|
||||||
"""
|
|
||||||
Base for all exception reporter filter classes. All overridable hooks
|
|
||||||
contain lenient default behaviors.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def get_post_parameters(self, request):
|
|
||||||
if request is None:
|
|
||||||
return {}
|
|
||||||
else:
|
|
||||||
return request.POST
|
|
||||||
|
|
||||||
def get_traceback_frame_variables(self, request, tb_frame):
|
|
||||||
return list(tb_frame.f_locals.items())
|
|
||||||
|
|
||||||
|
|
||||||
class SafeExceptionReporterFilter(ExceptionReporterFilter):
|
|
||||||
"""
|
"""
|
||||||
Use annotations made by the sensitive_post_parameters and
|
Use annotations made by the sensitive_post_parameters and
|
||||||
sensitive_variables decorators to filter out sensitive information.
|
sensitive_variables decorators to filter out sensitive information.
|
||||||
|
|
|
@ -425,6 +425,11 @@ Miscellaneous
|
||||||
* The :class:`~django.forms.FileInput` widget no longer renders with the
|
* The :class:`~django.forms.FileInput` widget no longer renders with the
|
||||||
``required`` HTML attribute when initial data exists.
|
``required`` HTML attribute when initial data exists.
|
||||||
|
|
||||||
|
* The undocumented ``django.views.debug.ExceptionReporterFilter`` class is
|
||||||
|
removed. As per the :ref:`custom-error-reports` documentation, classes to be
|
||||||
|
used with :setting:`DEFAULT_EXCEPTION_REPORTER_FILTER` needs to inherit from
|
||||||
|
:class:`django.views.debug.SafeExceptionReporterFilter`.
|
||||||
|
|
||||||
.. _deprecated-features-3.1:
|
.. _deprecated-features-3.1:
|
||||||
|
|
||||||
Features deprecated in 3.1
|
Features deprecated in 3.1
|
||||||
|
|
Loading…
Reference in New Issue