Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AttributeError on detect of tuple assign condition #931

Merged
merged 1 commit into from Jul 14, 2022

Conversation

ericwb
Copy link
Member

@ericwb ericwb commented Jul 12, 2022

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

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 PyCQA#520

Signed-off-by: Eric Brown <eric_wade_brown@yahoo.com>
@ericwb ericwb merged commit 9750181 into PyCQA:main Jul 14, 2022
@ericwb ericwb deleted the django_xss_assign branch July 14, 2022 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fails with AttributeError: 'Call' object has no attribute 'elts'
1 participant