From b6933fdb964f230cfdd6937d6d51aeb9ec2f7cc0 Mon Sep 17 00:00:00 2001 From: andryyy Date: Mon, 25 May 2020 16:13:51 +0200 Subject: [PATCH] [Web] Improve SPF checks --- data/web/inc/ajax/dns_diagnostics.php | 2 +- data/web/inc/spf.inc.php | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/data/web/inc/ajax/dns_diagnostics.php b/data/web/inc/ajax/dns_diagnostics.php index 841b86f2..1b4c6ea7 100644 --- a/data/web/inc/ajax/dns_diagnostics.php +++ b/data/web/inc/ajax/dns_diagnostics.php @@ -368,7 +368,7 @@ foreach ($records as $record) { $record[2] == $spf_link) { $state = state_nomatch; $rslt = get_spf_allowed_hosts($record[0]); - if(in_array($ip, $rslt) && in_array($ip6, $rslt)){ + if(in_array($ip, $rslt) && in_array(expand_ipv6($ip6), $rslt)){ $state = state_good; } $state .= '
' . $current[$data_field[$current['type']]].state_optional; diff --git a/data/web/inc/spf.inc.php b/data/web/inc/spf.inc.php index ddb9d48c..5e63b38b 100644 --- a/data/web/inc/spf.inc.php +++ b/data/web/inc/spf.inc.php @@ -1,6 +1,12 @@