mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Python: Fix typo in SSRF example
This commit is contained in:
@@ -8,8 +8,8 @@ def full_ssrf():
|
|||||||
target = request.args["target"]
|
target = request.args["target"]
|
||||||
|
|
||||||
# BAD: user has full control of URL
|
# BAD: user has full control of URL
|
||||||
resp = request.get("https://" + target + ".example.com/data/")
|
resp = requests.get("https://" + target + ".example.com/data/")
|
||||||
|
|
||||||
# GOOD: `subdomain` is controlled by the server.
|
# GOOD: `subdomain` is controlled by the server.
|
||||||
subdomain = "europe" if target == "EU" else "world"
|
subdomain = "europe" if target == "EU" else "world"
|
||||||
resp = request.get("https://" + subdomain + ".example.com/data/")
|
resp = requests.get("https://" + subdomain + ".example.com/data/")
|
||||||
|
|||||||
Reference in New Issue
Block a user