commit a712c5d: [Minor] Ratelimit: Do not forget to register symbol

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Apr 5 15:35:06 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-04-05 16:24:51 +0100
URL: https://github.com/rspamd/rspamd/commit/a712c5da35167e06e99fc2b2e0057a3f680fd4fc (HEAD -> master)

[Minor] Ratelimit: Do not forget to register symbol

---
 src/plugins/lua/ratelimit.lua | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua
index 7f999a8c4..8e51b4e6b 100644
--- a/src/plugins/lua/ratelimit.lua
+++ b/src/plugins/lua/ratelimit.lua
@@ -874,6 +874,14 @@ if opts then
         parent = id
       }
     end
+    if settings.symbol then
+      rspamd_config:register_symbol{
+        type = 'virtual',
+        name = settings.symbol,
+        score = 0.0, -- Might be overridden if needed
+        parent = id
+      }
+    end
 
     rspamd_config:register_symbol {
       type = 'idempotent',


More information about the Commits mailing list