]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] Fix is_local_domain to support backend objects
authorVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 8 Oct 2025 10:09:26 +0000 (11:09 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 8 Oct 2025 10:09:26 +0000 (11:09 +0100)
commit8400a02637e073f82d4bdfa1993923454fdbdae1
treea5adca6cdb7be9ddcc56af5c03ae489ad212cc06
parent22b41c97c3fc8cea51ab222a10a6d93e39736c41
[Fix] Fix is_local_domain to support backend objects

The is_local_domain function was directly accessing module_state.local_domains
as a table, which caused it to always return false when local_domains was
configured as a backend object (MapBackend, CDBBackend, etc).

Fixed by:
- Moving get_from_source helper function before is_local_domain
- Using get_from_source to handle both plain tables and backend objects
- Updating return logic to handle different truthy values from backends
lualib/lua_aliases.lua