Skip to content

Commit

Permalink
Fix regression in 2.9 involving unsafe Context.get_all() usage
Browse files Browse the repository at this point in the history
Since commit d67f0fd, callers
of Context.get_all() need to make a copy it they're going to
modify the result.

Fixes: d67f0fd ("Generalize scoping.  This fixes pallets#603")
  • Loading branch information
zmedico authored and mitsuhiko committed Aug 9, 2017
1 parent 3f49ba2 commit 60a7e77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jinja2/debug.py
Expand Up @@ -198,7 +198,7 @@ def translate_exception(exc_info, initial_skip=0):
def get_jinja_locals(real_locals):
ctx = real_locals.get('context')
if ctx:
locals = ctx.get_all()
locals = ctx.get_all().copy()
else:
locals = {}

Expand Down

0 comments on commit 60a7e77

Please sign in to comment.