diff --git a/data/web/inc/ajax/dns_diagnostics.php b/data/web/inc/ajax/dns_diagnostics.php index 23d99041..45ff07e2 100644 --- a/data/web/inc/ajax/dns_diagnostics.php +++ b/data/web/inc/ajax/dns_diagnostics.php @@ -368,8 +368,9 @@ foreach ($records as $record) { elseif ($current['type'] == 'TXT' && stripos($current['txt'], 'v=dkim') === 0 && stripos($record[2], 'v=dkim') === 0) { - $current['txt'] = str_replace(' ', '', $current['txt']); - if ($current[$data_field[$current['type']]] == $record[2]) { + 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); + if ($dkim_matches_current[1] == $dkim_matches_good[1]) { $state = state_good; } }