aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-30 15:26:16 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-30 15:26:16 +0100
commite8d715b09863453836906c19f8b82b43f08591dd (patch)
treef7ad89d0722c5624228760d594711be76d411040
parent50f8ab9d21b54018c1bc65af2a38453028e57a1f (diff)
downloadrspamd-e8d715b09863453836906c19f8b82b43f08591dd.tar.gz
rspamd-e8d715b09863453836906c19f8b82b43f08591dd.zip
[Minor] Dmarc: Relax grammar to allow elements with no semicolons
-rw-r--r--src/plugins/lua/dmarc.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua
index 2460fbe91..a46c6d7ab 100644
--- a/src/plugins/lua/dmarc.lua
+++ b/src/plugins/lua/dmarc.lua
@@ -102,12 +102,12 @@ 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
+ local sep = (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)
local version = lpeg.P("v") * space * lpeg.P("=") * space * lpeg.P("DMARC1")
- local record = version * space * sep * list
+ local record = version * sep * list
return record
end