From: Armin Ronacher Date: Thu, 29 Dec 2016 15:01:35 +0000 (+0100) Subject: Fixed a name error for an uncommon attribute access in the sandbox X-Git-Tag: 2.9~41^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74bd64e56387f5b2931040dc7235a3509cde1611;p=thirdparty%2Fjinja.git Fixed a name error for an uncommon attribute access in the sandbox --- diff --git a/CHANGES b/CHANGES index 29a773b9..01130549 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,14 @@ Jinja2 Changelog ================ +Version 2.8.2 +------------- + +(bugfix release, unreleased) + +- Fixed a runtime error in the sandbox when attributes of async generators + were accessed. + Version 2.8.1 ------------- diff --git a/jinja2/sandbox.py b/jinja2/sandbox.py index c035ddea..549c4276 100644 --- a/jinja2/sandbox.py +++ b/jinja2/sandbox.py @@ -206,7 +206,7 @@ def is_internal_attribute(obj, attr): if attr in UNSAFE_COROUTINE_ATTRIBUTES: return True elif hasattr(types, 'AsyncGeneratorType') and isinstance(obj, types.AsyncGeneratorType): - if attri in UNSAFE_ASYNC_GENERATOR_ATTRIBUTES: + if attr in UNSAFE_ASYNC_GENERATOR_ATTRIBUTES: return True return attr.startswith('__')