Skip to content

Commit 92fcd27

Browse files
committed
more test cleanup
1 parent a5670ff commit 92fcd27

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

aikido_zen/sinks/tests/requests_and_urllib3_test.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,12 @@ def ssrf_check(monkeypatch, url, requests_only=False):
9191
"http://[0000:0000:0000:0000:0000:0000:0000:0001]:8081/test",
9292
# private ips written differently
9393
"http://2130706433:8081",
94-
"http://0x7f000001:8081/",
94+
"http://0x7f000001:8081/",
9595
"http://0x7f.0x0.0x0.0x1:8081/",
9696
# 127.0.0.1 ipv6 mapped
9797
"http://[::ffff:127.0.0.1]:8081",
98+
# 127.0.0.1 with 0 padding
99+
"http://0127.0.0.01:8081",
98100
],
99101
)
100102
def test_ssrf_1(monkeypatch, url):
@@ -188,10 +190,6 @@ def test_srrf_with_request_to_itself_urllib3(monkeypatch):
188190
http.request("GET", "https://localhost/test/4")
189191

190192

191-
def test_ssrf(monkeypatch):
192-
ssrf_check(monkeypatch, "http://0177.0.0.01:8081/", requests_only=True)
193-
194-
195193
def test_ssrf_encoded_chars(monkeypatch):
196194
# This type of URL only works for requests
197195
ssrf_check(monkeypatch, "http://127%2E0%2E0%2E1:4000", requests_only=True)

0 commit comments

Comments
 (0)