]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Convert from rspamd_text
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 19 Jun 2017 07:28:42 +0000 (08:28 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 19 Jun 2017 07:28:42 +0000 (08:28 +0100)
src/plugins/lua/greylist.lua

index 292d1fcaa53bdfd588d7af12247acb0212cf5b30..424cf55093c6dedda66b6f44c215016251ffeb47 100644 (file)
@@ -207,7 +207,7 @@ local function greylist_check(task)
         task:insert_result(settings['symbol'], 0.0, 'greylisted', end_time)
 
         local ua = task:get_request_header('User-Agent') or ''
-        if ua == 'rspamc' then return end -- Likely rspamc scan
+        if tostring(ua) == 'rspamc' then return end -- Likely rspamc scan
 
         if settings.message_func then
           task:set_pre_result('soft reject',
@@ -312,7 +312,7 @@ local function greylist_set(task)
 
   local ua = task:get_request_header('User-Agent') or ''
   local is_rspamc = false
-  if ua == 'rspamc' then is_rspamc = true end
+  if tostring(ua) == 'rspamc' then is_rspamc = true end
 
   if is_whitelisted then
     if action == 'greylist' then