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; }