]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Minor] url_redirector: skip non-HTTP(S) URLs in http_walk 6035/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Tue, 12 May 2026 17:17:27 +0000 (20:17 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Tue, 12 May 2026 17:48:46 +0000 (20:48 +0300)
commit780290d0ea404ad23a4464202f212c6782b730e3
treec84217309ce55a1221db64d87f1734f679a4cac2
parenta4ae515366992bb0514afd891eab7c5982691371
[Minor] url_redirector: skip non-HTTP(S) URLs in http_walk

Non-HTTP(S) schemes (such as tel:, mailto:, etc.) cannot have HTTP
redirects. Attempting to follow them in http_walk is unnecessary and
could potentially lead to errors. This change skips these URLs early
in the redirect chain walk and emits the URL_REDIRECTOR_NON_HTTP
virtual symbol with a single option in the format:

  scheme=http_chain->non_http_url

e.g.: telephone=click.example.com->tel:+71234567890
src/plugins/lua/url_redirector.lua
test/functional/cases/167_url_redirector_non_http_scheme.robot [new file with mode: 0644]
test/functional/messages/redir_chain_tel_url.eml [new file with mode: 0644]
test/functional/messages/redir_multi_non_http.eml [new file with mode: 0644]
test/functional/messages/redir_tel_url.eml [new file with mode: 0644]
test/functional/util/dummy_http.py