Skip to content

Commit ecb30c6

Browse files
committed
add extra unit test for [::ffff:127.0.0.1]
1 parent 0ab2c2f commit ecb30c6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

aikido_zen/sinks/tests/requests_test.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,3 +202,14 @@ def test_0x7f_0x0_0x0_0x1_raises_ssrf(monkeypatch):
202202
requests.get("http://0x7f.0x0.0x0.0x1:8081/")
203203
with pytest.raises(AikidoSSRF):
204204
requests.get("http://0x7f.0x0.0x0.0x1:8081/test")
205+
206+
207+
def test_ffff_127_0_0_1_raises_ssrf(monkeypatch):
208+
set_context_and_lifecycle("http://[::ffff:127.0.0.1]:8081")
209+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
210+
with pytest.raises(AikidoSSRF):
211+
requests.get("http://[::ffff:127.0.0.1]:8081")
212+
with pytest.raises(AikidoSSRF):
213+
requests.get("http://[::ffff:127.0.0.1]:8081/")
214+
with pytest.raises(AikidoSSRF):
215+
requests.get("http://[::ffff:127.0.0.1]:8081/test")

0 commit comments

Comments
 (0)