[Web] Fix loop in SPF lookup
This commit is contained in:
parent
6e41fa9fc1
commit
692614f79e
@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
|
||||||
function get_spf_allowed_hosts($domain)
|
function get_spf_allowed_hosts($check_domain)
|
||||||
{
|
{
|
||||||
$hosts = array();
|
$hosts = array();
|
||||||
|
|
||||||
$records = dns_get_record($domain, DNS_TXT);
|
$records = dns_get_record($check_domain, DNS_TXT);
|
||||||
foreach ($records as $record)
|
foreach ($records as $record)
|
||||||
{
|
{
|
||||||
$txt = explode(' ', $record['entries'][0]);
|
$txt = explode(' ', $record['entries'][0]);
|
||||||
@ -47,7 +47,7 @@ function get_spf_allowed_hosts($domain)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$new_hosts = array();
|
$new_hosts = array();
|
||||||
if ($mech == 'include') // handle an inclusion
|
if ($mech == 'include' && $check_domain != $domain) // handle an inclusion
|
||||||
{
|
{
|
||||||
$new_hosts = get_spf_allowed_hosts($domain);
|
$new_hosts = get_spf_allowed_hosts($domain);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user