Parcourir la source

[Fix] dmarc gramar - allow spaces before ";"

The ABNF in https://www.rfc-editor.org/rfc/rfc7489#section-6.4 define that its allowed to have spaces before ";"
tags/3.6
Stephan Toggweiler il y a 10 mois
Parent
révision
008b90e09d
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2
    2
      lualib/plugins/dmarc.lua

+ 2
- 2
lualib/plugins/dmarc.lua Voir le fichier

@@ -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
return exports

Chargement…
Annuler
Enregistrer