]> git.ipfire.org Git - thirdparty/jinja.git/commit
Use stricter getattr() checks for decorator functions
authorTomas Krizek <tomas.krizek@mailbox.org>
Mon, 3 Feb 2020 22:25:56 +0000 (23:25 +0100)
committerDavid Lord <davidism@gmail.com>
Tue, 4 Feb 2020 16:37:58 +0000 (08:37 -0800)
commit9933324688170a7037a764717b4e88adefaf4101
tree0ecc357476675e5e7fc015be4a9a300a3322f375
parent3d5bfc6109bcc682f5266b118180e8b5fb775ae9
Use stricter getattr() checks for decorator functions

Explicit checks for "is True" prevents unexpected behaviour with objects
that are callable and have permissive gettatr(), such as Mock.

Fixes #1145
src/jinja2/asyncfilters.py
src/jinja2/compiler.py
src/jinja2/environment.py
src/jinja2/nodes.py
src/jinja2/runtime.py