Skip to content

Commit

Permalink
CS
Browse files Browse the repository at this point in the history
  • Loading branch information
Synchro committed Jun 2, 2020
1 parent a30835e commit 1d84f39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ public function validate(): array
$signatureToProcess = preg_replace('/\s+/', '', $signature);
//Split into tags
$dkimTags = explode(';', $signatureToProcess);
if(end($dkimTags) === '')
//Drop an empty last element caused by a trailing semi-colon
if (end($dkimTags) === '') {
array_pop($dkimTags);
}
foreach ($dkimTags as $tagIndex => $tagContent) {
[$tagName, $tagValue] = explode('=', trim($tagContent), 2);
unset($dkimTags[$tagIndex]);
Expand Down

0 comments on commit 1d84f39

Please sign in to comment.