From c85ea9a0c094e30a2cd3d8e0116495cbef5007aa Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Thu, 7 Sep 2023 09:45:02 +0200 Subject: [PATCH] Python: Fix typo in SSRF example --- .../CWE-918/examples/ServerSideRequestForgery_full.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ql/src/Security/CWE-918/examples/ServerSideRequestForgery_full.py b/python/ql/src/Security/CWE-918/examples/ServerSideRequestForgery_full.py index 4772f3eaea4..02724582182 100644 --- a/python/ql/src/Security/CWE-918/examples/ServerSideRequestForgery_full.py +++ b/python/ql/src/Security/CWE-918/examples/ServerSideRequestForgery_full.py @@ -8,8 +8,8 @@ def full_ssrf(): target = request.args["target"] # 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. subdomain = "europe" if target == "EU" else "world" - resp = request.get("https://" + subdomain + ".example.com/data/") + resp = requests.get("https://" + subdomain + ".example.com/data/")