Skip to content
Myr

Fix regression in 2.9 involving unsafe Context.get_all() usage

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Since commit d67f0fd4cc2a4af08f51f4466150d49da7798729, callers of Context.get_all() need to make a copy it they're going to modify the result.

authored by Zac Medico · committed by Armin Ronacher · parent 3f49ba2 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Fixes: d67f0fd4cc2a ("Generalize scoping. This fixes #603")

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:jinja2/debug.py+1 added-1 removed
196 unmodified lines
197198def get_jinja_locals(real_locals):199 ctx = real_locals.get('context')200 if ctx:201 locals = ctx.get_all()201 locals = ctx.get_all().copy()202 else:203 locals = {}204205 local_overrides = {}
167 unmodified lines