From 24e8a798c84413d3ed1d27b59b49acb674566491 Mon Sep 17 00:00:00 2001 From: Marcel Knorr <32003621+pathosDev@users.noreply.github.com> Date: Thu, 9 Apr 2020 22:21:17 +0200 Subject: [PATCH] [Web] Fixed DKIM regex to allow arguments after the public key (#3462) Co-authored-by: Marcel Knorr --- data/web/inc/ajax/dns_diagnostics.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/web/inc/ajax/dns_diagnostics.php b/data/web/inc/ajax/dns_diagnostics.php index bc7b52d1..841b86f2 100644 --- a/data/web/inc/ajax/dns_diagnostics.php +++ b/data/web/inc/ajax/dns_diagnostics.php @@ -376,8 +376,8 @@ foreach ($records as $record) { elseif ($current['type'] == 'TXT' && stripos($current['txt'], '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', $record[2], $dkim_matches_good); + 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; }