class documentation

class SafeExceptionReporterFilter: (source)

View In Hierarchy

Use annotations made by the sensitive_post_parameters and sensitive_variables decorators to filter out sensitive information.

Method cleanse_setting Cleanse an individual setting key/value of sensitive content. If the value is a dictionary, recursively cleanse the keys in that dictionary.
Method cleanse_special_types Undocumented
Method get_cleansed_multivaluedict Replace the keys in a MultiValueDict marked as sensitive with stars. This mitigates leaking sensitive POST parameters if something like request.POST['nonexistent_key'] throws an exception (#21098).
Method get_post_parameters Replace the values of POST parameters marked as sensitive with stars (*********).
Method get_safe_request_meta Return a dictionary of request.META with sensitive values redacted.
Method get_safe_settings Return a dictionary of the settings module with values of sensitive settings replaced with stars (*********).
Method get_traceback_frame_variables Replace the values of variables marked as sensitive with stars (*********).
Method is_active This filter is to add safety in production environments (i.e. DEBUG is False). If DEBUG is True then your site is not safe anyway. This hook is provided as a convenience to easily activate or deactivate the filter on a per request basis.
Class Variable cleansed_substitute Undocumented
Class Variable hidden_settings Undocumented
def cleanse_setting(self, key, value): (source)

Cleanse an individual setting key/value of sensitive content. If the value is a dictionary, recursively cleanse the keys in that dictionary.

def cleanse_special_types(self, request, value): (source)

Undocumented

def get_cleansed_multivaluedict(self, request, multivaluedict): (source)

Replace the keys in a MultiValueDict marked as sensitive with stars. This mitigates leaking sensitive POST parameters if something like request.POST['nonexistent_key'] throws an exception (#21098).

def get_post_parameters(self, request): (source)

Replace the values of POST parameters marked as sensitive with stars (*********).

def get_safe_request_meta(self, request): (source)

Return a dictionary of request.META with sensitive values redacted.

def get_safe_settings(self): (source)

Return a dictionary of the settings module with values of sensitive settings replaced with stars (*********).

def get_traceback_frame_variables(self, request, tb_frame): (source)

Replace the values of variables marked as sensitive with stars (*********).

def is_active(self, request): (source)

This filter is to add safety in production environments (i.e. DEBUG is False). If DEBUG is True then your site is not safe anyway. This hook is provided as a convenience to easily activate or deactivate the filter on a per request basis.

cleansed_substitute: str = (source)

Undocumented

hidden_settings = (source)

Undocumented