]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] lua_cta: remove empty DEFAULT_WHITELIST 6002/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Sun, 26 Apr 2026 08:18:00 +0000 (11:18 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Sun, 26 Apr 2026 08:18:00 +0000 (11:18 +0300)
The empty table caused a spurious warning in lua_maps when no
whitelist was configured. Since settings.whitelist defaults to nil,
the else-branch was a no-op. User-configured whitelists via
link_affiliation { whitelist = ... } continue to work as before.

lualib/lua_cta.lua

index 0712380344c4d0ac2179768f3f956a610963a73b..4f382b40d4ce2237156f6554f7d54307f64c935b 100644 (file)
@@ -70,10 +70,6 @@ local DEFAULT_STOPWORDS = {
   "mailerlite", "mailerq", "mailrelay", "mailup", "omnisend", "clickdimensions", "dotdigital", "pepipost"
 }
 
-local DEFAULT_WHITELIST = {
-  -- Intentionally empty by default. Users can add trusted eTLD+1 domains here
-}
-
 local DEFAULT_BLACKLIST = {
   -- Popular shorteners / redirection eTLD+1
   "t.co", "bit.ly", "goo.gl", "tinyurl.com", "lnkd.in", "buff.ly", "ow.ly", "rebrand.ly", "bitly.com", "is.gd", "v.gd",
@@ -112,8 +108,6 @@ local function load_settings()
     if type(settings.whitelist) ~= 'table' or not settings.whitelist.get_key then
       settings.whitelist = lua_maps.map_add_from_ucl(settings.whitelist, 'set', 'link affiliation whitelist')
     end
-  else
-    settings.whitelist = lua_maps.map_add_from_ucl(DEFAULT_WHITELIST, 'set', 'link affiliation whitelist (default)')
   end
   if settings.blacklist then
     if type(settings.blacklist) ~= 'table' or not settings.blacklist.get_key then