]> source.dussan.org Git - rspamd.git/commitdiff
Filter double-dots in rbl.lua validate_dns 205/head
authorAndrew Lewis <nerf@judo.za.org>
Wed, 11 Mar 2015 12:35:22 +0000 (14:35 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Wed, 11 Mar 2015 12:42:05 +0000 (14:42 +0200)
src/plugins/lua/rbl.lua

index 327bcb4b4d5f1b7fa1488029391803710c999372..ce43e54a2f256feb41206446bdad8e732bbb20fc 100644 (file)
@@ -37,6 +37,9 @@ local rspamd_logger = require 'rspamd_logger'
 local rspamd_ip = require 'rspamd_ip'
 
 local function validate_dns(lstr)
+  if lstr:match('%.%.') then
+    return false
+  end
   for v in lstr:gmatch('[^%.]+') do
     if not v:match('^[%w-]+$') or v:len() > 63
       or v:match('^-') or v:match('-$') then