diff options
author | Mikhail Galanin <mgalanin@mimecast.com> | 2018-09-21 12:24:05 +0100 |
---|---|---|
committer | Mikhail Galanin <mgalanin@mimecast.com> | 2018-09-21 12:24:05 +0100 |
commit | c37939b51cc01db39717c4b6954e53b6bcb2f12f (patch) | |
tree | 0a5c1c0a3b93bb7b7f0e4af90d812c80ca722550 /lualib/lua_selectors.lua | |
parent | 99123a5910bf905c4d1e6c5f8a2865a75c709f58 (diff) | |
download | rspamd-c37939b51cc01db39717c4b6954e53b6bcb2f12f.tar.gz rspamd-c37939b51cc01db39717c4b6954e53b6bcb2f12f.zip |
[Minor] Return nil if a random string used as selector
Diffstat (limited to 'lualib/lua_selectors.lua')
-rw-r--r-- | lualib/lua_selectors.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lualib/lua_selectors.lua b/lualib/lua_selectors.lua index d33f6f0c7..7de1a10d8 100644 --- a/lualib/lua_selectors.lua +++ b/lualib/lua_selectors.lua @@ -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 |