]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] Fix frequency-based ordering in HTML domain hashing 5661/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 8 Oct 2025 16:23:10 +0000 (17:23 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 8 Oct 2025 16:23:39 +0000 (17:23 +0100)
commitc5ccb00968b86a69d4ffbb16d4ddcb2dd6cb73b3
tree852652537224e460a820009000f5df130d3b11fe
parentc17ffb3ee193ff298e4c19ed3983fe0029ac870d
[Fix] Fix frequency-based ordering in HTML domain hashing

The hash_top_domains function was sorting domains by frequency (descending),
but hash_domain_list was immediately re-sorting them alphabetically, which
negated the frequency information. This resulted in incorrect hashes where
domain order mattered for fuzzy matching.

Added preserve_order parameter to hash_domain_list to optionally skip
alphabetical re-sorting when frequency-based ordering should be maintained.
src/libutil/shingles_html.cxx