Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on May 24, 2012
@gabrielhurley gabrielhurley Fixed #18379 -- Support methods with sensitive_variables.
Adds checking to the get_traceback_frame_variables method of
SafeExceptionReporterFilter to support methods as well as
functions in the global namespace.
Showing with 3 additions and 0 deletions.
  1. +3 −0 django/views/
3 django/views/
@@ -157,6 +157,9 @@ def get_traceback_frame_variables(self, request, tb_frame):
func_name = tb_frame.f_code.co_name
func = tb_frame.f_globals.get(func_name)
+ # Methods won't be in the global namespace, func could be None here...
+ if func is None and "self" in tb_frame.f_locals:
+ func = getattr(tb_frame.f_locals.get('self'), func_name, None)
sensitive_variables = getattr(func, 'sensitive_variables', [])
cleansed = []
if self.is_active(request) and sensitive_variables:

No commit comments for this range

Something went wrong with that request. Please try again.