Skip to content

Commit c87a1c8

Browse files
committed
Update installer_base.lib.php to fix the missed svr_ip that should have been modified to include both ipv4 and ipv6 in the previous quick fix before 911 https://git.ispconfig.org/ispconfig/ispconfig3/-/merge_requests/911 proposal was merged.
This caused failure to create LE SSL certs as reported in issue 5731 https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/5731. This commit is aimed to fixed the said issue.
1 parent 98ba3c4 commit c87a1c8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

install/lib/installer_base.lib.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2761,9 +2761,7 @@ public function make_ispconfig_ssl_cert() {
27612761

27622762
// Request for certs if no LE SSL folder for server fqdn exist
27632763
$le_live_dir = '/etc/letsencrypt/live/' . $hostname;
2764-
if (!@is_dir($le_live_dir) && (
2765-
($svr_ip4 && in_array($svr_ip4, $dns_ips)) || ($svr_ip6 && in_array($svr_ip6, $dns_ips))
2766-
)) {
2764+
if (!@is_dir($le_live_dir) && (($svr_ip4 && in_array($svr_ip4, $dns_ips)) || ($svr_ip6 && in_array($svr_ip6, $dns_ips)))) {
27672765

27682766
// This script is needed earlier to check and open http port 80 or standalone might fail
27692767
// Make executable and temporary symlink latest letsencrypt pre, post and renew hook script before install
@@ -2865,7 +2863,7 @@ public function make_ispconfig_ssl_cert() {
28652863
$date = new DateTime();
28662864

28672865
// If the LE SSL certs for this hostname exists
2868-
if (is_dir($le_live_dir) && in_array($svr_ip, $dns_ips)) {
2866+
if (is_dir($le_live_dir) && (($svr_ip4 && in_array($svr_ip4, $dns_ips)) || ($svr_ip6 && in_array($svr_ip6, $dns_ips)))) {
28692867

28702868
// Backup existing ispserver ssl files
28712869
if (file_exists($ssl_crt_file)) rename($ssl_crt_file, $ssl_crt_file . '-' .$date->format('YmdHis') . '.bak');

0 commit comments

Comments
 (0)