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 addccf9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bandit/plugins/jinja2_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ 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 addccf9

Please sign in to comment.