Skip to content

Handle bracketed URL netloc sanitization#2714

Open
0xTaoZ wants to merge 1 commit into
certtools:developfrom
0xTaoZ:codex/url-sanitize-invalid-netloc
Open

Handle bracketed URL netloc sanitization#2714
0xTaoZ wants to merge 1 commit into
certtools:developfrom
0xTaoZ:codex/url-sanitize-invalid-netloc

Conversation

@0xTaoZ

@0xTaoZ 0xTaoZ commented Jul 7, 2026

Copy link
Copy Markdown

Summary

  • restore URL validation for legacy feed URLs whose network location contains bracketed markers rejected by modern urllib
  • keep the existing urlsplit path for normal URLs and use a small fallback only when urlsplit raises ValueError
  • unskip the HTML table parser regression test for issue Regression on parsing invalid URLs #2382 and add direct URL harmonization coverage

Closes #2382.

Validation

  • git diff --check
  • INTELMQ_TEST_EXOTIC=1 .venv/bin/python -m pytest -q -o addopts='' intelmq/tests/bots/parsers/html_table/test_parser_column_split.py intelmq/tests/lib/test_harmonization.py intelmq/tests/lib/test_message.py
  • .venv/bin/python -m compileall -q intelmq/lib/harmonization.py intelmq/tests/lib/test_harmonization.py intelmq/tests/bots/parsers/html_table/test_parser_column_split.py

Risk

Low scope: the fallback only runs when urllib.parse.urlsplit() raises ValueError, while ordinary URL handling continues through the existing parser-backed path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression on parsing invalid URLs

1 participant