[Web] Fixed DKIM regex to allow arguments after the public key (#3462)

Co-authored-by: Marcel Knorr <marcel.knorr@mk-soft.net>
master
Marcel Knorr 2020-04-09 22:21:17 +02:00 committed by GitHub
parent fd3a8dd552
commit 24e8a798c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -376,8 +376,8 @@ foreach ($records as $record) {
elseif ($current['type'] == 'TXT' && elseif ($current['type'] == 'TXT' &&
stripos($current['txt'], 'v=dkim') === 0 && stripos($current['txt'], 'v=dkim') === 0 &&
stripos($record[2], 'v=dkim') === 0) { stripos($record[2], 'v=dkim') === 0) {
preg_match('/v=DKIM1;.*k=rsa;.*p=(.*)/i', $current[$data_field[$current['type']]], $dkim_matches_current); preg_match('/v=DKIM1;.*k=rsa;.*p=([^;]*).*/i', $current[$data_field[$current['type']]], $dkim_matches_current);
preg_match('/v=DKIM1;.*k=rsa;.*p=(.*)/i', $record[2], $dkim_matches_good); preg_match('/v=DKIM1;.*k=rsa;.*p=([^;]*).*/i', $record[2], $dkim_matches_good);
if ($dkim_matches_current[1] == $dkim_matches_good[1]) { if ($dkim_matches_current[1] == $dkim_matches_good[1]) {
$state = state_good; $state = state_good;
} }