]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] Dot add :// to mailto: URIs (RFC 6068)
authorAlexander Moisseev <moiseev@mezonplus.ru>
Tue, 12 May 2026 15:13:44 +0000 (18:13 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Tue, 12 May 2026 17:11:10 +0000 (20:11 +0300)
commita4ae515366992bb0514afd891eab7c5982691371
tree04dd6343459b54e9941f07d40e6dc30ebbbccdc5
parent4e8d6f9432de8862856ef92882c129b6dff12913
[Fix] Dot add :// to mailto: URIs (RFC 6068)

mailto: is non-hierarchical — the // authority component never applies.
The bug was in rspamd_mailto_parse setting RSPAMD_URL_FLAG_MISSINGSLASHES
when // was absent, causing rspamd_url_parse_text to
inject :// into the stored string.

Note: bare email addresses detected via the @ pattern (user@example.net
in text, no scheme prefix) still go through a different path where
"mailto://" is injected as a literal prefix — that's a separate issue
and out of scope here.
src/libserver/html/html_cta.cxx
src/libserver/url.c