Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bitterpanda63 committed Jan 28, 2025
1 parent 477ac81 commit a8e7e95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aikido_zen/helpers/check_env_for_blocking.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ def check_env_for_blocking():
# Set log level
aikido_blocking_env = os.getenv("AIKIDO_BLOCK")
if aikido_blocking_env is None:
aikido_blocking_env = os.getenv("AIKIDO_BLOCKING") # Fallback to AIKIDO_BLOCKING.
aikido_blocking_env = os.getenv(
"AIKIDO_BLOCKING"
) # Fallback to AIKIDO_BLOCKING.
if aikido_blocking_env is not None:
return aikido_blocking_env.lower() in ["true", "1"]
return False
2 changes: 2 additions & 0 deletions aikido_zen/sinks/tests/urrlib3_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,15 @@ def test_srrf_test_domain(monkeypatch):
with pytest.raises(AikidoSSRF):
http.request("GET", SSRF_TEST_DOMAIN)


def test_srrf_test_domain_with_aikido_blocking(monkeypatch):
http = urllib3.PoolManager()
set_context_and_lifecycle(SSRF_TEST_DOMAIN)
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
with pytest.raises(AikidoSSRF):
http.request("GET", SSRF_TEST_DOMAIN)


def test_srrf_test_domain_twice(monkeypatch):
http = urllib3.PoolManager()
set_context_and_lifecycle(SSRF_TEST_DOMAIN_TWICE)
Expand Down

0 comments on commit a8e7e95

Please sign in to comment.