Skip to content

Commit

Permalink
Allow select_autoescape to be an attribute (i.e. jinja2.select_autoes…
Browse files Browse the repository at this point in the history
…cape)
  • Loading branch information
kinow committed Mar 25, 2019
1 parent a975e63 commit 3572b7d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bandit/plugins/jinja2_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ def jinja2_autoescape_false(context):
elif isinstance(value, ast.Call) and getattr(
value.func, 'id', None) == 'select_autoescape':
return
elif isinstance(value, ast.Call) and getattr(
value.func, 'attr', None) == \
'select_autoescape':
return
else:
return bandit.Issue(
severity=bandit.HIGH,
Expand Down

0 comments on commit 3572b7d

Please sign in to comment.