]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Redis key expansion: EVAL: deal with strings
authorAndrew Lewis <nerf@judo.za.org>
Tue, 27 Feb 2018 13:18:48 +0000 (15:18 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Tue, 27 Feb 2018 13:18:48 +0000 (15:18 +0200)
lualib/lua_redis.lua

index a23ad781ff3328f54c64b776825fe29080562f7f..aab0fc8f14554c78248c9929da1a1082c36a18e6 100644 (file)
@@ -225,7 +225,7 @@ local process_cmd = {
   eval = function(args)
     local idx_l = {}
     local numkeys = args[2]
-    if numkeys >= 1 then
+    if numkeys and tonumber(numkeys) >= 1 then
       for i = 3, numkeys + 2 do
         table.insert(idx_l, i)
       end