commit e8d715b: [Minor] Dmarc: Relax grammar to allow elements with no semicolons
Vsevolod Stakhov
vsevolod at highsecure.ru
Fri Jul 30 15:35:05 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-07-30 15:26:16 +0100
URL: https://github.com/rspamd/rspamd/commit/e8d715b09863453836906c19f8b82b43f08591dd
[Minor] Dmarc: Relax grammar to allow elements with no semicolons
---
src/plugins/lua/dmarc.lua | 4 ++--
1 file 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
More information about the Commits
mailing list