Skip to content

Commit 38b0fe8

Browse files
author
jnsc
committed
Merge remote-tracking branch 'upstream/stable-3.1' into Various_3.1_fixes
2 parents f4cdb2f + b62d081 commit 38b0fe8

File tree

8 files changed

+101
-125
lines changed

8 files changed

+101
-125
lines changed

docs/autoinstall_samples/autoinstall.conf_sample.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
$autoinstall['http_server'] = 'nginx'; // apache (default), nginx
1212
$autoinstall['ispconfig_port'] = '8080'; // default: 8080
1313
$autoinstall['ispconfig_use_ssl'] = 'y'; // y (default), n
14+
$autoinstall['ispconfig_admin_password'] = 'admin'; // default: admin
1415

1516
/* SSL Settings */
1617
$autoinstall['ssl_cert_country'] = 'AU';

docs/autoinstall_samples/autoinstall.ini.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ mysql_charset=utf8
1010
http_server=apache
1111
ispconfig_port=8080
1212
ispconfig_use_ssl=y
13+
ispconfig_admin_password=admin
1314

1415
[ssl_cert]
1516
ssl_cert_country=AU

install/install.php

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

547547
//** Customise the port ISPConfig runs on
548548
$ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port');
549-
$conf['interface_password'] = $inst->free_query('Admin password', 'admin');
549+
$conf['interface_password'] = $inst->free_query('Admin password', 'admin','ispconfig_admin_password');
550550
if($conf['interface_password'] != 'admin') {
551551
$check = false;
552552
do {

interface/web/mail/lib/lang/ca_spamfilter_policy.lng

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ $wb['bad_header_lover_txt'] = 'Aime les mauvaises entêtes';
77
$wb['bypass_virus_checks_txt'] = 'Contourner la vérification des virus';
88
$wb['bypass_banned_checks_txt'] = 'Contourner la vérification des bannissements.';
99
$wb['bypass_header_checks_txt'] = 'Contourner la vérification des entêtes';
10-
$wb['virus_quarantine_to_txt'] = 'Faire suivre les virus vers lemail';
11-
$wb['spam_quarantine_to_txt'] = 'Faire suivre le spam vers lemail';
12-
$wb['banned_quarantine_to_txt'] = 'Faire suivre les bannis vers lemail';
13-
$wb['bad_header_quarantine_to_txt'] = 'Faire suivre les mauvaises entêtes vers lemail';
14-
$wb['clean_quarantine_to_txt'] = 'Faire suivre ce qui est propre vers lemail';
15-
$wb['other_quarantine_to_txt'] = 'Faire suivre les autres vers lemail';
10+
$wb['virus_quarantine_to_txt'] = 'Faire suivre les virus vers le mail';
11+
$wb['spam_quarantine_to_txt'] = 'Faire suivre le spam vers le mail';
12+
$wb['banned_quarantine_to_txt'] = 'Faire suivre les bannis vers le mail';
13+
$wb['bad_header_quarantine_to_txt'] = 'Faire suivre les mauvaises entêtes vers le mail';
14+
$wb['clean_quarantine_to_txt'] = 'Faire suivre ce qui est propre vers le mail';
15+
$wb['other_quarantine_to_txt'] = 'Faire suivre les autres vers le mail';
1616
$wb['spam_tag_level_txt'] = 'Niveau du tag de SPAM';
1717
$wb['spam_tag2_level_txt'] = 'Niveau du tag2 de SPAM';
1818
$wb['spam_kill_level_txt'] = 'Niveau du kill de SPAM';

interface/web/mail/lib/lang/fr_spamfilter_policy.lng

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ $wb['bad_header_lover_txt'] = 'Aime les mauvaises entêtes';
77
$wb['bypass_virus_checks_txt'] = 'Contourner la vérification des virus';
88
$wb['bypass_banned_checks_txt'] = 'Contourner la vérification des bannissements.';
99
$wb['bypass_header_checks_txt'] = 'Contourner la vérification des entêtes';
10-
$wb['virus_quarantine_to_txt'] = 'Faire suivre les virus vers lemail';
11-
$wb['spam_quarantine_to_txt'] = 'Faire suivre le spam vers lemail';
12-
$wb['banned_quarantine_to_txt'] = 'Faire suivre les bannis vers lemail';
13-
$wb['bad_header_quarantine_to_txt'] = 'Faire suivre les mauvaises entêtes vers lemail';
14-
$wb['clean_quarantine_to_txt'] = 'Faire suivre ce qui est propre vers lemail';
15-
$wb['other_quarantine_to_txt'] = 'Faire suivre les autres vers lemail';
10+
$wb['virus_quarantine_to_txt'] = 'Faire suivre les virus vers le mail';
11+
$wb['spam_quarantine_to_txt'] = 'Faire suivre le spam vers le mail';
12+
$wb['banned_quarantine_to_txt'] = 'Faire suivre les bannis vers le mail';
13+
$wb['bad_header_quarantine_to_txt'] = 'Faire suivre les mauvaises entêtes vers le mail';
14+
$wb['clean_quarantine_to_txt'] = 'Faire suivre ce qui est propre vers le mail';
15+
$wb['other_quarantine_to_txt'] = 'Faire suivre les autres vers le mail';
1616
$wb['spam_tag_level_txt'] = 'Niveau du tag de SPAM';
1717
$wb['spam_tag2_level_txt'] = 'Niveau du tag2 de SPAM';
1818
$wb['spam_kill_level_txt'] = 'Niveau du kill de SPAM';

server/plugins-available/apache2_plugin.inc.php

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,11 +1153,8 @@ function update($event_name, $data) {
11531153
$crt_file = $ssl_dir.'/'.$domain.'.crt';
11541154
$bundle_file = $ssl_dir.'/'.$domain.'.bundle';
11551155

1156-
$vhost_data['ssl_crt_file'] = $crt_file;
1157-
$vhost_data['ssl_key_file'] = $key_file;
1158-
$vhost_data['ssl_bundle_file'] = $bundle_file;
1159-
11601156
if($data['new']['ssl'] == 'y' && $data['new']['ssl_letsencrypt'] == 'y') {
1157+
$domain = $data['new']['domain'];
11611158
if(substr($domain, 0, 2) === '*.') {
11621159
// wildcard domain not yet supported by letsencrypt!
11631160
$app->log('Wildcard domains not yet supported by letsencrypt, so changing ' . $domain . ' to ' . substr($domain, 2), LOGLEVEL_WARN);
@@ -1173,6 +1170,10 @@ function update($event_name, $data) {
11731170
$bundle_file = $ssl_dir.'/'.$domain.'-le.bundle';
11741171
}
11751172

1173+
$vhost_data['ssl_crt_file'] = $crt_file;
1174+
$vhost_data['ssl_key_file'] = $key_file;
1175+
$vhost_data['ssl_bundle_file'] = $bundle_file;
1176+
11761177
//* Generate Let's Encrypt SSL certificat
11771178
if($data['new']['ssl'] == 'y' && $data['new']['ssl_letsencrypt'] == 'y' && ( // ssl and let's encrypt is active
11781179
($data['old']['ssl'] == 'n' || $data['old']['ssl_letsencrypt'] == 'n') // we have new let's encrypt configuration
@@ -1256,8 +1257,9 @@ function update($event_name, $data) {
12561257
//* check is been correctly created
12571258
if(file_exists($crt_tmp_file)) {
12581259
$date = date("YmdHis");
1260+
//* TODO: check if is a symlink, if target same keep it, either remove it
12591261
if(is_file($key_file)) {
1260-
$app->system->copy($key_file, $key_file.'.old'.$date);
1262+
$app->system->copy($key_file, $key_file.'.old.'.$date);
12611263
$app->system->chmod($key_file.'.old.'.$date, 0400);
12621264
$app->system->unlink($key_file);
12631265
}
@@ -1396,10 +1398,10 @@ function update($event_name, $data) {
13961398
$alias_seo_redirects = array();
13971399
switch($data['new']['subdomain']) {
13981400
case 'www':
1399-
$server_alias[] .= 'www.'.$data['new']['domain'].' ';
1401+
$server_alias[] = 'www.'.$data['new']['domain'].' ';
14001402
break;
14011403
case '*':
1402-
$server_alias[] .= '*.'.$data['new']['domain'].' ';
1404+
$server_alias[] = '*.'.$data['new']['domain'].' ';
14031405
break;
14041406
}
14051407
if(is_array($aliases)) {
@@ -2086,8 +2088,7 @@ function delete($event_name, $data) {
20862088

20872089
// remove letsencrypt if it exists (renew will always fail otherwise)
20882090

2089-
$old_domain = $data['old']['ssl_domain'];
2090-
if(!$old_domain) $old_domain = $data['old']['domain'];
2091+
$old_domain = $data['old']['domain'];
20912092
if(substr($old_domain, 0, 2) === '*.') {
20922093
// wildcard domain not yet supported by letsencrypt!
20932094
$old_domain = substr($old_domain, 2);
@@ -3010,7 +3011,7 @@ private function hhvm_update($data, $web_config) {
30103011
}
30113012

30123013
if($data['new']['php'] == 'hhvm' && $data['old']['php'] != 'hhvm' || (isset($data['old']['custom_php_ini']) && $data['new']['custom_php_ini'] != $data['old']['custom_php_ini'])) {
3013-
3014+
30143015
// Custom php.ini settings
30153016
$custom_php_ini_settings = trim($data['new']['custom_php_ini']);
30163017
if(intval($data['new']['directive_snippets_id']) > 0){
@@ -3039,7 +3040,7 @@ private function hhvm_update($data, $web_config) {
30393040
} else {
30403041
if($data['old']['system_user'] != '' && is_file('/etc/hhvm/'.$data['old']['system_user'].'.ini')) unlink('/etc/hhvm/'.$data['old']['system_user'].'.ini');
30413042
}
3042-
3043+
30433044
$content = str_replace('{SYSTEM_USER}', $data['new']['system_user'], $content);
30443045
file_put_contents('/etc/init.d/hhvm_' . $data['new']['system_user'], $content);
30453046
exec('chmod +x /etc/init.d/hhvm_' . $data['new']['system_user'] . ' >/dev/null 2>&1');
@@ -3061,12 +3062,12 @@ private function hhvm_update($data, $web_config) {
30613062
if(is_file('/etc/hhvm/'.$data['old']['system_user'].'.ini')) unlink('/etc/hhvm/'.$data['old']['system_user'].'.ini');
30623063
}
30633064

3064-
if(is_file('/etc/monit/conf.d/hhvm_' . $data['new']['system_user']) || is_file('/etc/monit/conf.d/00-hhvm_' . $data['new']['system_user'])){
3065-
if(is_file('/etc/monit/conf.d/hhvm_' . $data['new']['system_user'])){
3066-
unlink('/etc/monit/conf.d/hhvm_' . $data['new']['system_user']);
3065+
if(is_file('/etc/monit/conf.d/hhvm_' . $data['old']['system_user']) || is_file('/etc/monit/conf.d/00-hhvm_' . $data['old']['system_user'])){
3066+
if(is_file('/etc/monit/conf.d/hhvm_' . $data['old']['system_user'])){
3067+
unlink('/etc/monit/conf.d/hhvm_' . $data['old']['system_user']);
30673068
}
3068-
if(is_file('/etc/monit/conf.d/00-hhvm_' . $data['new']['system_user'])){
3069-
unlink('/etc/monit/conf.d/00-hhvm_' . $data['new']['system_user']);
3069+
if(is_file('/etc/monit/conf.d/00-hhvm_' . $data['old']['system_user'])){
3070+
unlink('/etc/monit/conf.d/00-hhvm_' . $data['old']['system_user']);
30703071
}
30713072
exec('/etc/init.d/monit restart >/dev/null 2>&1');
30723073
}
@@ -3224,9 +3225,9 @@ private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name,
32243225
}
32253226
}
32263227
}
3227-
3228+
32283229
$tpl->setVar('custom_session_save_path', ($custom_session_save_path ? 'y' : 'n'));
3229-
3230+
32303231
$tpl->setLoop('custom_php_ini_settings', $final_php_ini_settings);
32313232

32323233
$app->system->file_put_contents($pool_dir.$pool_name.'.conf', $tpl->grab());

server/plugins-available/backup_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function backup_action($action_name, $data) {
129129
//$db_name = $parts[1];
130130
preg_match('@^db_(.+)_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}\.sql\.gz$@', $backup['filename'], $matches);
131131
$db_name = $matches[1];
132-
$command = "gunzip --stdout ".escapeshellarg($backup_dir.'/'.$backup['filename'])." | mysql -h '".escapeshellarg($clientdb_host)."' -u '".escapeshellarg($clientdb_user)."' -p'".escapeshellarg($clientdb_password)."' '".$db_name."'";
132+
$command = "gunzip --stdout ".escapeshellarg($backup_dir.'/'.$backup['filename'])." | mysql -h ".escapeshellarg($clientdb_host)." -u ".escapeshellarg($clientdb_user)." -p".escapeshellarg($clientdb_password)." ".escapeshellarg($db_name);
133133
exec($command);
134134
}
135135
unset($clientdb_host);

0 commit comments

Comments
 (0)