]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] Propagate source/classification URL flags to query-extracted URLs
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 24 Feb 2026 21:42:03 +0000 (21:42 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 24 Feb 2026 21:42:03 +0000 (21:42 +0000)
commit30f6750b1812dcaf952ee774d8a05bf7838b4a56
tree31976748030ce4ada7f4d1cfdb90e9b75e790d74
parent404df7cb7bc10a72a2963b92a5b5a0cf0db78b21
[Fix] Propagate source/classification URL flags to query-extracted URLs

When a URL is found inside the query string of another URL (e.g.
http://redir.com/?q=http://target.com), the inner URL now inherits
source/classification flags (FROM_TEXT, CONTENT, SUBJECT, INVISIBLE)
from the outer URL via RSPAMD_URL_FLAG_PROPAGATE_MASK.

Previously, inner URLs only received the QUERY flag, losing all context
about where the parent URL was found. This caused inconsistencies in
plugins that filter URLs by source flags (e.g. RBL content URL filtering).

Also fixes two bugs in the subject path (rspamd_url_task_subject_callback):
- hostlen check used outer URL instead of inner query URL
- QUERY flag was not set on URLs extracted from subject URL queries
src/libserver/html/html.cxx
src/libserver/url.c
src/libserver/url.h