]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Add sanity check for url filters
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 15 Aug 2016 09:48:36 +0000 (10:48 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 15 Aug 2016 09:48:58 +0000 (10:48 +0100)
src/plugins/lua/multimap.lua

index 5976a7c5a12c0d92d0cd43a03f83c8ba3bd95801..31cd01d50998e1f8c17136217d271f68ff33f91a 100644 (file)
@@ -60,6 +60,10 @@ local function apply_hostname_filter(task, filter, hostname, r)
 end
 
 local function apply_url_filter(task, filter, url, r)
+  if not filter then
+    return url:get_host()
+  end
+
   if filter == 'tld' then
     return url:get_tld()
   elseif filter == 'full' then