DKIMValidator
DKIMValidator copied to clipboard
PHP DKIM signature validator
Canonicalization algorithm "simple" must be interpreted as "simple/simple". According to the RFC: rfc4871-dkimbase.html#dkim-sig-hdr rfc6376#section-3.5 ..If only one algorithm is named, that algorithm is used for the header and "simple" is...
This library: Great work! The branch organization bit me though. Everybody who does `composer require phpmailer/dkimvalidator` is stuck on the year-old 0.3 release. Workaround: `composer require phpmailer/dkimvalidator:dev-dev@dev` Everybody who does...
If the header value is folded and the continuation line contains leading whitespace: ``` Subject: Subject Subject Subject Subject Subject Subject Subject Subject Subject Subject ``` the simple header canonicalization...
If the header value contains leading whitespace: ``` Subject: Subject Subject ``` the header canonicalization strips it: ``` Subject: Subject Subject ``` This leads to an (incorrect) failed validation. According...
``` Warning: Undefined array key 1 Validator.php on line... ... Fatal error: Uncaught TypeError: ...::canonicalizeBody(): Argument #2 ($style) must be of type string, null given, ``` error at: line 87:...
The [DKIM spec](https://datatracker.ietf.org/doc/html/rfc4871#section-3.5) allows for FWS on either side of the colon separator in the list of header field names for the “h=“ tag. For example: ``` DKIM-Signature: v=1; a=rsa-sha256;...
validator.php line:296 ``` public static function fetchPublicKeys(string $domain, string $selector) { $host = sprintf('%s._domainkey.%s', $selector, $domain); $textRecords = dns_get_record($host, DNS_TXT); if ($textRecords === false) { return false; } ``` dns_get_record...
``` protected function canonicalizeHeaders(array $headers, string $style = '**relaxed**'): string ... protected function canonicalizeBody(string $body, string $style = '**relaxed**', int $length = -1): string ``` _https://tools.ietf.org/html/rfc6376#section-3.5_ _c= Message canonicalization (plain-text;...
line: 144 (Validator.php): `if ((int) $dkimTags['x'] < (int) $dkimTags['t']) {` MUST BE: if ( **isset($dkimTags['t']) &&** ((int) $dkimTags['x'] < (int) $dkimTags['t']) ) { ? _rfc4871-dkimbase.html#dkim-sig-hdr_: The value of the "x="...
Undefined array key 1 at /phpmailer/dkimvalidator/src/Validator.php