From 88736a38866bfb28c9aea4a72a9bf4c301345e9b Mon Sep 17 00:00:00 2001 From: Alexander Sagen Date: Fri, 26 Apr 2024 11:37:24 +0200 Subject: [PATCH] Encoding\DkimTagValue\Tag: Ignore missing base64 padding --- src/encoding/dkim_tag_value/tag.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/encoding/dkim_tag_value/tag.php b/src/encoding/dkim_tag_value/tag.php index d9cbb30..aa257fa 100644 --- a/src/encoding/dkim_tag_value/tag.php +++ b/src/encoding/dkim_tag_value/tag.php @@ -1,7 +1,6 @@ name === 'p' && !SimpleValidator::isValid($this->value, SimpleValidator::TYPE_BASE64)) { + if ($this->name === 'p' && preg_match('/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}(?:==)?|[A-Za-z0-9+\/]{3}=?)?$/', $this->value) !== 1) { Log::warning('DkimTagValue/Tag: invalid public key value for DKIM1 tag "p="'); return false; }