Skip to content

Commit ad241d9

Browse files
committed
Merge branch '6328-support-php-8-x' of git.ispconfig.org:ispconfig/ispconfig3 into 6328-support-php-8-x
2 parents b09eb07 + 7b5d092 commit ad241d9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+246
-242
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ build:package:
9090
- if [[ "$VER" == "" ]] ; then VER="3.2dev"$(date +%s) ; fi
9191
- if [[ "$VER" != "" ]] ; then echo "Replacing 3.2dev by $VER" ; sed -i -r 's/3\.2dev/'${VER}'/g' install/tpl/config.inc.php.master install/sql/ispconfig3.sql ; fi
9292
- RET=0
93-
- tar -cpzf ISPConfig-${VER}.tar.gz --exclude "ISPConfig-${VER}.tar.gz" --exclude ".git*" --exclude ".phplint.yml" --transform 's,^\./,ispconfig3_install/,' . || RET=$?
93+
- tar -cpzf ISPConfig-${VER}.tar.gz --exclude "ISPConfig-${VER}.tar.gz" --exclude ".git*" --exclude ".phplint.yml" --transform 's,^\./,ispconfig3_install/,' --mode='0775' ./* || RET=$?
9494
- if [[ $RET > 1 ]] ; then exit $RET ; fi
9595
- echo "Listing tar contents for verification"
9696
- tar -tvf ISPConfig-${VER}.tar.gz
@@ -101,4 +101,4 @@ build:package:
101101
- echo "Download url is https://download.ispconfig.org/ISPConfig-${VER}.tar.gz"
102102

103103
needs: ["syntax:lint"]
104-
allow_failure: false
104+
allow_failure: false

install/dist/conf/gentoo.conf.php

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
$conf['services']['file'] = true;
5252
$conf['services']['db'] = true;
5353
$conf['services']['vserver'] = true;
54+
$conf['services']['proxy'] = false;
55+
$conf['services']['firewall'] = false;
5456

5557
//* MySQL
5658
$conf['mysql']['installed'] = false; // will be detected automatically during installation
@@ -80,16 +82,16 @@
8082
$conf['apache']['user'] = 'apache';
8183
$conf['apache']['group'] = 'apache';
8284
$conf['apache']['init_script'] = 'apache2';
83-
$conf['apache']['version'] = '2.2';
85+
$conf['apache']['version'] = '2.4';
8486
$conf['apache']['config_dir'] = '/etc/apache2';
8587
$conf['apache']['config_file'] = $conf['apache']['config_dir'] .'/httpd.conf';
8688
$conf['apache']['ssl_dir'] = '/etc/ssl/apache2';
8789
$conf['apache']['vhost_conf_dir'] = $conf['apache']['config_dir'] . '/vhosts.d';
8890
$conf['apache']['vhost_conf_enabled_dir'] = $conf['apache']['vhost_conf_dir'];
8991
$conf['apache']['vhost_default'] = '00_default_vhost.conf';
9092
$conf['apache']['vhost_port'] = '8080';
91-
$conf['apache']['php_ini_path_apache'] = '/etc/php/apache2-php5/php.ini';
92-
$conf['apache']['php_ini_path_cgi'] = '/etc/php/cgi-php5/php.ini';
93+
$conf['apache']['php_ini_path_apache'] = '/etc/php/apache2-php7.4/php.ini';
94+
$conf['apache']['php_ini_path_cgi'] = '/etc/php/cgi-php7.4/php.ini';
9395

9496
//* Website base settings
9597
$conf['web']['website_basedir'] = '/var/www';
@@ -110,7 +112,7 @@
110112
$conf['awstats']['buildstaticpages_pl'] = '/usr/bin/awstats_buildstaticpages.pl';
111113

112114
//* Fastcgi
113-
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/cgi-php5';
115+
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/cgi-php7.4';
114116
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
115117
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
116118

@@ -131,6 +133,10 @@
131133
$conf['mailman']['config_dir'] = '/etc/mailman';
132134
$conf['mailman']['init_script'] = 'mailman';
133135

136+
//* mlmmj
137+
$conf['mlmmj']['installed'] = false; // will be detected automatically during installation
138+
$conf['mlmmj']['config_dir'] = '/etc/mlmmj';
139+
134140
//* Getmail
135141
$conf['getmail']['installed'] = false; // will be detected automatically during installation
136142
$conf['getmail']['user'] = 'getmail';
@@ -176,6 +182,7 @@
176182
$conf['pureftpd']['config_file'] = '/etc/conf.d/pure-ftpd';
177183
$conf['pureftpd']['mysql_config_file'] = '/etc/pureftpd-mysql.conf';
178184
$conf['pureftpd']['init_script'] = 'pure-ftpd';
185+
$conf['pureftpd']['main_config_file'] = '/etc/pure-ftpd.conf';
179186

180187
//* MyDNS
181188
$conf['mydns']['installed'] = false; // will be detected automatically during installation
@@ -226,6 +233,13 @@
226233
$conf['nginx']['php_fpm_start_port'] = 9010;
227234
$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php5-fpm';
228235

236+
//* OpenVZ
237+
$conf['openvz']['installed'] = false;
238+
239+
//*Bastille-Firwall
240+
$conf['bastille']['installed'] = false;
241+
$conf['bastille']['config_dir'] = '/etc/Bastille';
242+
229243
//* vlogger
230244
$conf['vlogger']['config_dir'] = '/etc/vlogger';
231245

@@ -235,10 +249,12 @@
235249
$conf['cron']['group'] = 'cron';
236250
$conf['cron']['wget'] = '/usr/bin/wget';
237251

238-
//* OpenVZ
239-
$conf['openvz']['installed'] = false;
252+
//* Metronome XMPP
253+
$conf['xmpp']['installed'] = false;
254+
$conf['xmpp']['init_script'] = 'metronome';
240255

241256
// AppArmor
242257
$conf['apparmor']['installed'] = false;
243258

259+
244260
?>

install/dist/tpl/gentoo/apache_ispconfig.vhost.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
{vhost_port_listen} Listen {vhost_port}
88
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>
9-
NameVirtualHost *:{vhost_port}
9+
# NameVirtualHost *:{vhost_port}
1010
</tmpl_if>
1111

1212
<VirtualHost _default_:{vhost_port}>

install/lib/installer_base.lib.php

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ private function install_acme() {
5252
}
5353

5454
public function update_acme() {
55-
$acme = explode("\n", shell_exec('which acme.sh /usr/local/ispconfig/server/scripts/acme.sh /root/.acme.sh/acme.sh'));
55+
$acme = explode("\n", shell_exec('which acme.sh /usr/local/ispconfig/server/scripts/acme.sh /root/.acme.sh/acme.sh 2> /dev/null'));
5656
$acme = reset($acme);
5757
$val = 0;
5858

@@ -892,6 +892,20 @@ public function configure_jailkit() {
892892
public function configure_mailman($status = 'insert') {
893893
global $conf;
894894

895+
// Fix for #6314: bug on Debian 11 systems where Mailman3 is not available and broken routes exist in the Mailman config
896+
$data_dir = '/var/lib/mailman';
897+
if (($conf['mailman']['installed'] != true) && is_dir($data_dir)) {
898+
rename($data_dir, $data_dir . '-bk');
899+
//* Create the mailman files
900+
if(!is_dir('/var/lib/mailman/data')) exec('mkdir -p /var/lib/mailman/data');
901+
if(!is_file('/var/lib/mailman/data/aliases')) touch('/var/lib/mailman/data/aliases');
902+
exec('postmap /var/lib/mailman/data/aliases');
903+
if(!is_file('/var/lib/mailman/data/virtual-mailman')) touch('/var/lib/mailman/data/virtual-mailman');
904+
exec('postmap /var/lib/mailman/data/virtual-mailman');
905+
if(!is_file('/var/lib/mailman/data/transport-mailman')) touch('/var/lib/mailman/data/transport-mailman');
906+
exec('postmap /var/lib/mailman/data/transport-mailman');
907+
}
908+
895909
$config_dir = $conf['mailman']['config_dir'].'/';
896910
$full_file_name = $config_dir.'mm_cfg.py';
897911
//* Backup exiting file
@@ -1653,7 +1667,7 @@ public function configure_amavis() {
16531667
//* These postconf commands will be executed on installation and update
16541668
$server_ini_rec = $this->db->queryOneRecord("SELECT mail_server, config FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . '.server', $conf['server_id']);
16551669
$server_ini_array = ini_to_array(stripslashes($server_ini_rec['config']));
1656-
$mail_server = ($server_ini_rec['mail_server']) ? true : false;
1670+
$mail_server = $conf['services']['mail'];
16571671
unset($server_ini_rec);
16581672

16591673
// amavisd user config file
@@ -1777,7 +1791,7 @@ public function configure_rspamd() {
17771791
//* These postconf commands will be executed on installation and update
17781792
$server_ini_rec = $this->db->queryOneRecord("SELECT mail_server, config FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . '.server', $conf['server_id']);
17791793
$server_ini_array = ini_to_array(stripslashes($server_ini_rec['config']));
1780-
$mail_server = ($server_ini_rec['mail_server']) ? true : false;
1794+
$mail_server = $conf['services']['mail'];
17811795
unset($server_ini_rec);
17821796

17831797
$config_dir = $conf['postfix']['config_dir'];
@@ -1981,8 +1995,13 @@ public function configure_rspamd() {
19811995

19821996
exec('chmod a+r /etc/rspamd/local.d/* /etc/rspamd/local.d/maps.d/* /etc/rspamd/override.d/*');
19831997
# protect passwords in these files
1984-
exec('chgrp _rspamd /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf /etc/rspamd/local.d/worker-controller.inc');
1985-
exec('chmod 640 /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf /etc/rspamd/local.d/worker-controller.inc');
1998+
exec('chgrp _rspamd /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf');
1999+
exec('chmod 640 /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf');
2000+
2001+
if(file_exists('/etc/rspamd/local.d/worker-controller.inc')) {
2002+
exec('chgrp _rspamd /etc/rspamd/local.d/worker-controller.inc');
2003+
exec('chmod 640 /etc/rspamd/local.d/worker-controller.inc');
2004+
}
19862005

19872006
# unneccesary, since this was done above?
19882007
$command = 'usermod -a -G amavis _rspamd';

install/tpl/apache_apps.vhost.master

Lines changed: 0 additions & 134 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
server/conf/apache_apps.vhost.master

install/tpl/server.ini.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ php_fpm_default_chroot=n
140140
bind_user=root
141141
bind_group=bind
142142
bind_zonefiles_dir=/etc/bind
143+
bind_keyfiles_dir=/etc/bind
143144
named_conf_path=/etc/bind/named.conf
144145
named_conf_local_path=/etc/bind/named.conf.local
145146
disable_bind_log=n

install/tpl/system.ini.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ web_php_options=no,fast-cgi,mod,php-fpm
3939
show_aps_menu=n
4040
client_protection=y
4141
ssh_authentication=
42+
le_caa_autocreate_options=y
4243

4344

4445
[tools]

install/uninstall.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
@exec('chattr -i /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter');
9999
@unlink("/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter");
100100
@unlink("/var/www/php-fcgi-scripts/ispconfig");
101+
@unlink("/etc/ssl/private/pure-ftpd.pem");
101102

102103
echo "Backups in /var/backup/ and log files in /var/log/ispconfig are not deleted.";
103104
echo "Finished uninstalling.\n";

interface/lib/classes/functions.inc.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,14 @@ private function _idn_encode_decode($domain, $encode = true) {
334334
$domain = substr($domain, strrpos($domain, '@') + 1);
335335
}
336336

337+
// idn_to_* chokes on leading dots, but we need them for amavis, so remove it for later
338+
if(substr($domain, 0, 1) === '.') {
339+
$leading_dot = true;
340+
$domain = substr($domain, 1);
341+
} else {
342+
$leading_dot = false;
343+
}
344+
337345
if($encode == true) {
338346
if(function_exists('idn_to_ascii')) {
339347
if(defined('IDNA_NONTRANSITIONAL_TO_ASCII') && defined('INTL_IDNA_VARIANT_UTS46') && constant('IDNA_NONTRANSITIONAL_TO_ASCII')) {
@@ -378,6 +386,10 @@ private function _idn_encode_decode($domain, $encode = true) {
378386
}
379387
}
380388

389+
if($leading_dot == true) {
390+
$domain = '.' . $domain;
391+
}
392+
381393
if($user_part !== false) return $user_part . '@' . $domain;
382394
else return $domain;
383395
}

0 commit comments

Comments
 (0)