From: Alexander Moisseev Date: Thu, 17 Nov 2016 07:28:18 +0000 (+0300) Subject: [Minor] settings: make string matches case insensitive X-Git-Tag: 1.4.0~42^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f0a30558c9f157f383d77eee71038b00ebd5c78e;p=rspamd.git [Minor] settings: make string matches case insensitive Resolves: #1136 Reported by: @gibzer --- diff --git a/src/plugins/lua/settings.lua b/src/plugins/lua/settings.lua index a94017090..76898ae58 100644 --- a/src/plugins/lua/settings.lua +++ b/src/plugins/lua/settings.lua @@ -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