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

Use of urlopen() #20

Open
Pascal-0x90 opened this issue Aug 12, 2020 · 2 comments
Open

Use of urlopen() #20

Pascal-0x90 opened this issue Aug 12, 2020 · 2 comments

Comments

@Pascal-0x90
Copy link
Collaborator

Proposal

The use of urlopen() can pose security threats and should be replaced with a safer alternative.

Motivation

The codebase should more strictly follow Python convention to hopefully improve maintainability.

Details

I feel this is something we can leave alone in the code. The user cannot define custom URLs. The security vulnerability comes when the user can define the use of file:// however, we only let the user have access to the http:// and https:// protocols.

response = request.urlopen(req, timeout=timeout) # nosec

@Pascal-0x90 Pascal-0x90 mentioned this issue Aug 12, 2020
9 tasks
@DoctorEww
Copy link
Collaborator

I agree there is not an obvious way to exploit the protocol; I don't see this as an issue.

@S4lt5
Copy link

S4lt5 commented Oct 27, 2022

@Pascal-0x90 @DoctorEww While it might not be exploitable, I had always understood that urllib (not urrllib3 pip module) is not thread safe. Does that pose any issues here with use in the threadpool?

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

No branches or pull requests

3 participants