diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-05-16 16:05:10 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-05-16 16:05:10 +0100 |
commit | cb038700560b6a16980229b26feed72a0ceeba5b (patch) | |
tree | d5f3b2931664e1f384e812e651d3595834eba0fc /lualib/plugins | |
parent | c8f3600c70b2a02e69550f0fcc610dce0f07d48b (diff) | |
download | rspamd-cb038700560b6a16980229b26feed72a0ceeba5b.tar.gz rspamd-cb038700560b6a16980229b26feed72a0ceeba5b.zip |
[Fix] Allow spaces in DMARC records
Issue: #4906
Diffstat (limited to 'lualib/plugins')
-rw-r--r-- | lualib/plugins/dmarc.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lualib/plugins/dmarc.lua b/lualib/plugins/dmarc.lua index 7791f4eb3..38977ff58 100644 --- a/lualib/plugins/dmarc.lua +++ b/lualib/plugins/dmarc.lua @@ -240,8 +240,8 @@ local function gen_dmarc_grammar() lpeg.locale(lpeg) local space = lpeg.space ^ 0 local name = lpeg.C(lpeg.alpha ^ 1) * space - local sep = space * (lpeg.S("\\;") * space) + (lpeg.space ^ 1) - local value = lpeg.C(lpeg.P(lpeg.graph - sep) ^ 1) + local sep = space * (lpeg.S("\\;") * space) + (lpeg.P(lpeg.graph - lpeg.P(',')) * lpeg.space ^ 1) + local value = lpeg.C(lpeg.P(lpeg.P(lpeg.graph + lpeg.space) - sep) ^ 1) local pair = lpeg.Cg(name * "=" * space * value) * sep ^ -1 local list = lpeg.Cf(lpeg.Ct("") * pair ^ 0, rawset) local version = lpeg.P("v") * space * lpeg.P("=") * space * lpeg.P("DMARC1") |