]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Return nil if a random string used as selector
authorMikhail Galanin <mgalanin@mimecast.com>
Fri, 21 Sep 2018 11:24:05 +0000 (12:24 +0100)
committerMikhail Galanin <mgalanin@mimecast.com>
Fri, 21 Sep 2018 11:24:05 +0000 (12:24 +0100)
lualib/lua_selectors.lua

index d33f6f0c727115c917edc118a59c0de59fd313f3..7de1a10d891138b80330267f2d25f356e93e0a4a 100644 (file)
@@ -743,7 +743,7 @@ exports.parse_selector = function(cfg, str)
   local parsed = {parser:match(str)}
   local output = {}
 
-  if not parsed then return nil end
+  if not parsed or not parsed[1] then return nil end
 
   -- Output AST format is the following:
   -- table of individual selectors