From: Andrew Lewis Date: Wed, 11 Mar 2015 12:35:22 +0000 (+0200) Subject: Filter double-dots in rbl.lua validate_dns X-Git-Tag: 0.9.0~517^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F206%2Fhead;p=rspamd.git Filter double-dots in rbl.lua validate_dns --- diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index 327bcb4b4..ce43e54a2 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -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