]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Fix issue with scores comparison while I'm here
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 22 Jun 2025 14:48:34 +0000 (15:48 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 22 Jun 2025 14:48:34 +0000 (15:48 +0100)
Issue: #5384

lualib/lua_cfg_transform.lua

index aaa0c7390d8b99f29bb85a6d485aebbf13fa04f6..ec11ef29960bfdfa0d30bd4579127193a243b9af 100644 (file)
@@ -376,7 +376,7 @@ return function(cfg)
           local next_act = actions_order[j]
           if actions:at(next_act) and actions:at(next_act):type() == 'number' then
             local next_score = actions:at(next_act):unwrap()
-            if next_score <= score then
+            if type(score) == 'number' and type(next_score) == 'number' and next_score <= score then
               logger.errx(rspamd_config, 'invalid actions thresholds order: action %s (%s) must have lower ' ..
                   'score than action %s (%s)', act, score, next_act, next_score)
               ret = false