Skip to content

Commit abbe42a

Browse files
author
patched.codes[bot]
committed
Patched /Users/user/Documents/GitHub/example-python/main.py
1 parent c5febd7 commit abbe42a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
url = 'http://example.com' # Replace with a valid URL
1515
req = requests.Request('GET', url)
1616
prep = req.prepare()
17-
session.rebuild_proxies(prep, proxies)
17+
18+
# Check if the scheme does not start with 'https' before adding Proxy-Authorization header
19+
if not prep.url.startswith('https'):
20+
session.rebuild_proxies(prep, proxies)
1821

1922
# Introduce a command injection vulnerability
2023
user_input = input("Enter a command to execute: ")

0 commit comments

Comments
 (0)