]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix OMOGRAPH_URL for the changes in the phished flag
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 9 Mar 2021 21:17:53 +0000 (21:17 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 9 Mar 2021 21:17:53 +0000 (21:17 +0000)
rules/misc.lua

index 376e6990f861478ad62584d1ce99e10e1a49ec35..8f98fcc0645e047587f4d1e9767a10916c2befdf 100644 (file)
@@ -399,7 +399,10 @@ rspamd_config.OMOGRAPH_URL = {
         if u:is_phished() then
 
           local h1 = u:get_host()
-          local h2 = u:get_phished():get_host()
+          local h2 = u:get_phished()
+          if h2 then -- Due to changes of the phished flag in 2.8
+            h2 = h2:get_host()
+          end
           if h1 and h2 then
             local selt = string.format('%s->%s', h1, h2)
             if not seen[selt] and util.is_utf_spoofed(h1, h2) then