diff options
| author | Dennis Fink | 2026-11-17 14:44:00 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-17 14:44:00 +0100 |
| commit | 227092b57acc886469e16bcc4c0d3256e86d3d1e (patch) | |
| tree | c1de8d5f8f3a37562e482f84e8017213c08a05d6 /tests/test_net.py | |
| parent | f98b0e446b41325c494bd97900b7bbf730a7d67e (diff) | |
| download | webmentions-ssg-227092b57acc886469e16bcc4c0d3256e86d3d1e.tar.gz webmentions-ssg-227092b57acc886469e16bcc4c0d3256e86d3d1e.zip | |
feat(receiver): add source domain access rules
Add persistent source block and allow lists with authenticated
management, single-row and bulk blocking actions, and optional
fail-closed allowlist mode.
Reject disallowed sources before enqueueing and recheck policy in
verification workers, while sharing canonical hostname normalization
across receiver, sender, and configuration paths.
Diffstat (limited to 'tests/test_net.py')
| -rw-r--r-- | tests/test_net.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/tests/test_net.py b/tests/test_net.py index 472ae91..6ff267d 100644 --- a/tests/test_net.py +++ b/tests/test_net.py @@ -25,7 +25,6 @@ from webmentions_ssg.net import ( is_http_url, is_public_address, media_type_of, - normalized_hostname, read_limited_body, resolve_public_addresses, ) @@ -344,19 +343,6 @@ def test_is_retryable_status(app: Flask, status: int, expected: bool) -> None: @pytest.mark.parametrize( - ("url", "expected"), - [ - pytest.param("https://EXAMPLE.com./path", "example.com", id="trailing-dot"), - pytest.param("http://[2001:db8::1]/", "2001:db8::1", id="ipv6"), - pytest.param("https:///path", None, id="missing-host"), - pytest.param("http://[::1", None, id="malformed-ipv6"), - ], -) -def test_normalized_hostname(url: str, expected: str | None) -> None: - assert normalized_hostname(url) == expected - - -@pytest.mark.parametrize( ("headers", "expected"), [ pytest.param({}, "", id="missing"), |
