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

get_url returns different urls calling twice #506

Closed
ehooo opened this issue Jun 24, 2019 · 1 comment
Closed

get_url returns different urls calling twice #506

ehooo opened this issue Jun 24, 2019 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@ehooo
Copy link
Contributor

ehooo commented Jun 24, 2019

Describe the bug
The function get_url overwrite the info['id'] stored on extension_loader.MANAGER.blacklist_by_id

To Reproduce
Steps to reproduce the behavior:

In [1]: from bandit.core.docs_utils import get_url                                                                                                                                                                                                                      
In [2]: get_url('B304')                                                                                                                                                                                                                                                 
Out[2]: 'https://bandit.readthedocs.io/en/latest/blacklists/blacklist_calls.html#b304-b305-ciphers-and-modes'
In [3]: get_url('B304')                                                                                                                                                                                                                                                 
Out[3]: 'https://bandit.readthedocs.io/en/latest/blacklists/blacklist_imports.html#b304-b305-ciphers-and-modes'

Expected behavior
Call to bid with same bid must return same url

Bandit version

bandit 1.6.1
  python version = 3.6.8 (default, Jan 31 2019, 09:38:34) [GCC 8.2.1 20181215 (Red Hat 8.2.1-6)]
@ericwb ericwb added the bug Something isn't working label Jun 25, 2019
ericwb pushed a commit that referenced this issue Jul 7, 2019
* Fix bug #506
- Test included

* Fix pep8

* Fix pep8

* Fix pep8

* Fix test

* fix typos

* fix PR comments
@ericwb
Copy link
Member

ericwb commented Jul 7, 2019

Fixed with #507

@ericwb ericwb closed this as completed Jul 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants