summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-07-22 19:31:14 +0100
committerGitHub <noreply@github.com>2023-07-22 19:31:14 +0100
commit1e224376b74993b3ffc1c2ee388c6c7e9ff2747e (patch)
tree6713f05a2604e25aeb6d29999ca464802886696a
parenteab26882e1e2215b85d4bfc1cefb219719e4a428 (diff)
parent008b90e09d8004a41db507c84ebab0f15a1f7f75 (diff)
downloadrspamd-1e224376b74993b3ffc1c2ee388c6c7e9ff2747e.tar.gz
rspamd-1e224376b74993b3ffc1c2ee388c6c7e9ff2747e.zip
Merge pull request #4547 from rheoli/dmarc_txt_fix
[Fix] dmarc gramar - allow spaces before ";"
-rw-r--r--lualib/plugins/dmarc.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lualib/plugins/dmarc.lua b/lualib/plugins/dmarc.lua
index b080324b0..24efb5078 100644
--- a/lualib/plugins/dmarc.lua
+++ b/lualib/plugins/dmarc.lua
@@ -241,7 +241,7 @@ local function gen_dmarc_grammar()
lpeg.locale(lpeg)
local space = lpeg.space^0
local name = lpeg.C(lpeg.alpha^1) * space
- local sep = (lpeg.S("\\;") * space) + (lpeg.space^1)
+ local sep = space * (lpeg.S("\\;") * space) + (lpeg.space^1)
local value = lpeg.C(lpeg.P(lpeg.graph - sep)^1)
local pair = lpeg.Cg(name * "=" * space * value) * sep^-1
local list = lpeg.Cf(lpeg.Ct("") * pair^0, rawset)
@@ -357,4 +357,4 @@ end
exports.dmarc_check_record = dmarc_check_record
-return exports \ No newline at end of file
+return exports