Commit 9750181
authored
Fix AttributeError on detect of tuple assign condition (#931)
In a specific example where a tuple is assigned to a call
such as a choice of options, Bandit throws a traceback due
to an assumption the assign is to a value of another tuple
instead of a call.
This change will avoid the traceback, but not necessarily help
in detection of an XSS in this example.
Fixes #520
Signed-off-by: Eric Brown <eric_wade_brown@yahoo.com>1 parent 6a00317 commit 9750181
File tree
3 files changed
+13
-3
lines changed- bandit/plugins
- examples
- tests/functional
3 files changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
550 | | - | |
551 | | - | |
| 550 | + | |
| 551 | + | |
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
| |||
0 commit comments