fix domain variable for gethostbynamel6 function
Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
This commit is contained in:
@@ -1523,7 +1523,7 @@ class Domains extends ApiCommand implements ResourceEntity
|
|||||||
|
|
||||||
// validate dns if lets encrypt is enabled to check whether we can use it at all
|
// validate dns if lets encrypt is enabled to check whether we can use it at all
|
||||||
if ($letsencrypt == '1' && Settings::Get('system.le_domain_dnscheck') == '1') {
|
if ($letsencrypt == '1' && Settings::Get('system.le_domain_dnscheck') == '1') {
|
||||||
$domain_ips = PhpHelper::gethostbynamel6($domain, true, Settings::Get('system.le_domain_dnscheck_resolver'));
|
$domain_ips = PhpHelper::gethostbynamel6($result['domain'], true, Settings::Get('system.le_domain_dnscheck_resolver'));
|
||||||
$selected_ips = $this->getIpsFromIdArray($ssl_ipandports);
|
$selected_ips = $this->getIpsFromIdArray($ssl_ipandports);
|
||||||
if ($domain_ips == false || count(array_intersect($selected_ips, $domain_ips)) <= 0) {
|
if ($domain_ips == false || count(array_intersect($selected_ips, $domain_ips)) <= 0) {
|
||||||
Response::standardError('invaliddnsforletsencrypt', '', true);
|
Response::standardError('invaliddnsforletsencrypt', '', true);
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ class SubDomains extends ApiCommand implements ResourceEntity
|
|||||||
// validate dns if lets encrypt is enabled to check whether we can use it at all
|
// validate dns if lets encrypt is enabled to check whether we can use it at all
|
||||||
if ($letsencrypt == '1' && Settings::Get('system.le_domain_dnscheck') == '1') {
|
if ($letsencrypt == '1' && Settings::Get('system.le_domain_dnscheck') == '1') {
|
||||||
$our_ips = Domain::getIpsOfDomain($domain_check['id']);
|
$our_ips = Domain::getIpsOfDomain($domain_check['id']);
|
||||||
$domain_ips = PhpHelper::gethostbynamel6($domain, true, Settings::Get('system.le_domain_dnscheck_resolver'));
|
$domain_ips = PhpHelper::gethostbynamel6($completedomain, true, Settings::Get('system.le_domain_dnscheck_resolver'));
|
||||||
if ($domain_ips == false || count(array_intersect($our_ips, $domain_ips)) <= 0) {
|
if ($domain_ips == false || count(array_intersect($our_ips, $domain_ips)) <= 0) {
|
||||||
Response::standardError('invaliddnsforletsencrypt', '', true);
|
Response::standardError('invaliddnsforletsencrypt', '', true);
|
||||||
}
|
}
|
||||||
@@ -738,7 +738,7 @@ class SubDomains extends ApiCommand implements ResourceEntity
|
|||||||
// validate dns if lets encrypt is enabled to check whether we can use it at all
|
// validate dns if lets encrypt is enabled to check whether we can use it at all
|
||||||
if ($result['letsencrypt'] != $letsencrypt && $letsencrypt == '1' && Settings::Get('system.le_domain_dnscheck') == '1') {
|
if ($result['letsencrypt'] != $letsencrypt && $letsencrypt == '1' && Settings::Get('system.le_domain_dnscheck') == '1') {
|
||||||
$our_ips = Domain::getIpsOfDomain($result['parentdomainid']);
|
$our_ips = Domain::getIpsOfDomain($result['parentdomainid']);
|
||||||
$domain_ips = PhpHelper::gethostbynamel6($domain, true, Settings::Get('system.le_domain_dnscheck_resolver'));
|
$domain_ips = PhpHelper::gethostbynamel6($result['domain'], true, Settings::Get('system.le_domain_dnscheck_resolver'));
|
||||||
if ($domain_ips == false || count(array_intersect($our_ips, $domain_ips)) <= 0) {
|
if ($domain_ips == false || count(array_intersect($our_ips, $domain_ips)) <= 0) {
|
||||||
Response::standardError('invaliddnsforletsencrypt', '', true);
|
Response::standardError('invaliddnsforletsencrypt', '', true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user