]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] settings: make string matches case insensitive 1145/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Thu, 17 Nov 2016 07:28:18 +0000 (10:28 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Thu, 17 Nov 2016 07:28:18 +0000 (10:28 +0300)
Resolves: #1136
Reported by: @gibzer

src/plugins/lua/settings.lua

index a940170907bb43afc7a00b918a8a07af862c4b22..76898ae589747ef53e1e6ec61a0a8461b0e8eabf 100644 (file)
@@ -93,17 +93,17 @@ local function check_settings(task)
   local function check_addr_setting(rule, addr)
     local function check_specific_addr(elt)
       if rule['name'] then
-        if elt['addr'] == rule['name'] then
+        if rule['name']:lower() == elt['addr']:lower() then
           return true
         end
       end
       if rule['user'] then
-        if rule['user'] == elt['user'] then
+        if rule['user']:lower() == elt['user']:lower() then
           return true
         end
       end
       if rule['domain'] then
-        if rule['domain'] == elt['domain'] then
+        if rule['domain']:lower() == elt['domain']:lower() then
           return true
         end
       end