Skip to content

Commit c3189ce

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1'
2 parents 5152e9a + d933cc2 commit c3189ce

Some content is hidden

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

46 files changed

+181
-118
lines changed

install/install.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,12 +344,13 @@
344344
$conf['services']['dns'] = true;
345345
}
346346
*/
347+
347348
//* Configure Bind
348349
if($conf['bind']['installed']) {
349350
swriteln('Configuring BIND');
350351
$inst->configure_bind();
351352
$conf['services']['dns'] = true;
352-
if(!$inst->find_installed_apps('haveged')) {
353+
if(!is_installed('haveged')) {
353354
swriteln("[INFO] haveged not detected - DNSSEC can fail");
354355
}
355356
}
@@ -732,7 +733,7 @@
732733
swriteln('Configuring BIND');
733734
$inst->configure_bind();
734735
$conf['services']['dns'] = true;
735-
if(!$inst->find_installed_apps('haveged')) {
736+
if(!is_installed('haveged')) {
736737
swriteln("[INFO] haveged not detected - DNSSEC can fail");
737738
}
738739
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE `directive_snippets` ADD `master_directive_snippets_id` int(11) unsigned NOT NULL DEFAULT '0' AFTER `active`;

install/tpl/apache_ispconfig.vhost.master

Lines changed: 48 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -8,101 +8,111 @@ NameVirtualHost *:<tmpl_var name="vhost_port">
88

99
<VirtualHost _default_:<tmpl_var name="vhost_port">>
1010
ServerAdmin webmaster@localhost
11-
11+
1212
<FilesMatch "\.ph(p3?|tml)$">
1313
SetHandler None
1414
</FilesMatch>
15-
15+
1616
<IfModule mod_fcgid.c>
1717
DocumentRoot /var/www/ispconfig/
1818
SuexecUserGroup ispconfig ispconfig
1919
<Directory /var/www/ispconfig/>
2020
Options -Indexes +FollowSymLinks +MultiViews +ExecCGI
2121
AllowOverride AuthConfig Indexes Limit Options FileInfo
22-
<FilesMatch "\.php$">
23-
SetHandler fcgid-script
24-
</FilesMatch>
22+
<FilesMatch "\.php$">
23+
SetHandler fcgid-script
24+
</FilesMatch>
2525
FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
2626
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
27-
Require all granted
28-
<tmpl_else>
27+
Require all granted
28+
<tmpl_else>
2929
Order allow,deny
3030
Allow from all
31-
</tmpl_if>
31+
</tmpl_if>
3232
</Directory>
3333
IPCCommTimeout 7200
34-
MaxRequestLen 15728640
34+
MaxRequestLen 15728640
3535
</IfModule>
36-
36+
3737
<IfModule mpm_itk_module>
3838
DocumentRoot /usr/local/ispconfig/interface/web/
39-
AssignUserId ispconfig ispconfig
39+
AssignUserId ispconfig ispconfig
4040
AddType application/x-httpd-php .php
4141
<Directory /usr/local/ispconfig/interface/web>
4242
# php_admin_value open_basedir "/usr/local/ispconfig/interface:/usr/share:/tmp"
4343
Options +FollowSymLinks
4444
AllowOverride None
4545
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
46-
Require all granted
47-
<tmpl_else>
46+
Require all granted
47+
<tmpl_else>
4848
Order allow,deny
4949
Allow from all
50-
</tmpl_if>
51-
php_value magic_quotes_gpc 0
50+
</tmpl_if>
51+
php_value magic_quotes_gpc 0
5252
</Directory>
5353
</IfModule>
54-
54+
5555
# ErrorLog /var/log/apache2/error.log
5656
# CustomLog /var/log/apache2/access.log combined
5757
ServerSignature Off
58-
58+
5959
<IfModule mod_security2.c>
6060
SecRuleEngine Off
6161
</IfModule>
6262

6363
# SSL Configuration
6464
<tmpl_var name="ssl_comment">SSLEngine On
65+
<tmpl_if name='apache_version' op='>=' value='2.3.16' format='version'>
66+
<tmpl_var name="ssl_comment">SSLProtocol All -SSLv3
67+
<tmpl_else>
6568
<tmpl_var name="ssl_comment">SSLProtocol All -SSLv2 -SSLv3
69+
</tmpl_if>
6670
<tmpl_var name="ssl_comment">SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt
6771
<tmpl_var name="ssl_comment">SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key
6872
<tmpl_var name="ssl_bundle_comment">SSLCACertificateFile /usr/local/ispconfig/interface/ssl/ispserver.bundle
6973

70-
<tmpl_var name="ssl_comment">SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4
74+
<tmpl_var name="ssl_comment">SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
7175
<tmpl_var name="ssl_comment">SSLHonorCipherOrder On
76+
<tmpl_if name='apache_version' op='>=' value='2.4.3' format='version'>
77+
<tmpl_var name="ssl_comment">SSLCompression Off
78+
</tmpl_if>
79+
<tmpl_if name='apache_version' op='>=' value='2.4.11' format='version'>
80+
<tmpl_var name="ssl_comment">SSLSessionTickets Off
81+
</tmpl_if>
7282

7383
<IfModule mod_headers.c>
7484
Header always add Strict-Transport-Security "max-age=15768000"
7585
</IfModule>
7686

77-
<tmpl_if name='apache_version' op='>=' value='2.4' format='version'>
78-
<tmpl_var name="ssl_comment">SSLUseStapling on
87+
<tmpl_if name='apache_version' op='>=' value='2.3.3' format='version'>
88+
<tmpl_var name="ssl_comment">SSLUseStapling On
7989
<tmpl_var name="ssl_comment">SSLStaplingResponderTimeout 5
80-
<tmpl_var name="ssl_comment">SSLStaplingReturnResponderErrors off
81-
</tmpl_if>
90+
<tmpl_var name="ssl_comment">SSLStaplingReturnResponderErrors Off
91+
</tmpl_if>
8292
</VirtualHost>
8393

84-
<tmpl_if name='apache_version' op='>=' value='2.4' format='version'>
94+
<tmpl_if name='apache_version' op='>=' value='2.3.3' format='version'>
8595
<IfModule mod_ssl.c>
8696
<tmpl_var name="ssl_comment">SSLStaplingCache shmcb:/var/run/ocsp(128000)
8797
</IfModule>
8898
</tmpl_if>
8999

90100
<Directory /var/www/php-cgi-scripts>
91-
AllowOverride None
92-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
93-
Require all denied
94-
<tmpl_else>
95-
Order Deny,Allow
96-
Deny from all
97-
</tmpl_if>
101+
AllowOverride None
102+
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
103+
Require all denied
104+
<tmpl_else>
105+
Order Deny,Allow
106+
Deny from all
107+
</tmpl_if>
98108
</Directory>
99109

100110
<Directory /var/www/php-fcgi-scripts>
101-
AllowOverride None
102-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
103-
Require all denied
104-
<tmpl_else>
105-
Order Deny,Allow
106-
Deny from all
107-
</tmpl_if>
108-
</Directory>
111+
AllowOverride None
112+
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
113+
Require all denied
114+
<tmpl_else>
115+
Order Deny,Allow
116+
Deny from all
117+
</tmpl_if>
118+
</Directory>

install/update.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@
378378
} elseif($conf['bind']['installed'] == true) {
379379
swriteln('Configuring BIND');
380380
$inst->configure_bind();
381-
if(!$inst->find_installed_apps('haveged')) {
381+
if(!is_installed('haveged')) {
382382
swriteln("[INFO] haveged not detected - DNSSEC can fail");
383383
}
384384
} else {

interface/lib/classes/json_handler.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function run() {
9191

9292
if(is_array($_POST)) {
9393
foreach($_POST as $key => $val) {
94-
$tmp = json_decode($val);
94+
$tmp = json_decode($val, true);
9595
if(!$tmp) $params[] = $val;
9696
else $params[] = (array)$tmp;
9797
}

interface/lib/classes/tform_base.inc.php

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ protected function _encode($record, $tab, $dbencode = true, $api = false) {
831831
}
832832

833833
//* Add slashes to all records, when we encode data which shall be inserted into mysql.
834-
if($dbencode == true) $new_record[$key] = $app->db->quote($new_record[$key]);
834+
if($dbencode == true && !is_null($new_record[$key])) $new_record[$key] = $app->db->quote($new_record[$key]);
835835
}
836836
}
837837
return $new_record;
@@ -973,22 +973,33 @@ function validateField($field_name, $field_value, $validators) {
973973
$this->errorMessage .= $errmsg."<br />\r\n";
974974
}
975975
}
976+
break;
976977
case 'ISEMAIL':
978+
$error = false;
977979
if($validator['allowempty'] != 'y') $validator['allowempty'] = 'n';
978980
if($validator['allowempty'] == 'y' && $field_value == '') {
979981
//* Do nothing
980982
} else {
981983
if(function_exists('filter_var')) {
982984
if(filter_var($field_value, FILTER_VALIDATE_EMAIL) === false) {
985+
$error = true;
986+
} else {
987+
if (!preg_match("/^[^\\+]+$/", $field_value)) { // * disallow + in local-part
988+
$error = true;
989+
}
990+
}
991+
if ($error) {
983992
$errmsg = $validator['errmsg'];
984993
if(isset($this->wordbook[$errmsg])) {
985994
$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
986995
} else {
987996
$this->errorMessage .= $errmsg."<br />\r\n";
988997
}
989998
}
999+
9901000
} else $this->errorMessage .= "function filter_var missing <br />\r\n";
9911001
}
1002+
unset($error);
9921003
break;
9931004
case 'ISINT':
9941005
if(function_exists('filter_var') && $field_value < 2147483647) {
@@ -1028,7 +1039,7 @@ function validateField($field_name, $field_value, $validators) {
10281039
break;
10291040
case 'V6PREFIXLENGTH':
10301041
// find shortes ipv6 subnet can`t be longer
1031-
$sql_v6 = $app->db->queryOneRecord("SELECT ip_address FROM server_ip WHERE ip_type = 'IPv6' AND virtualhost = 'y' ORDER BY CHAR_LENGTH(ip_address) ASC LIMIT 0,1;");
1042+
$sql_v6 = $app->db->queryOneRecord("SELECT ip_address FROM server_ip WHERE ip_type = 'IPv6' AND virtualhost = 'y' ORDER BY CHAR_LENGTH(ip_address) ASC LIMIT 0,1");
10321043
$sql_v6_explode=explode(':',$sql_v6['ip_address']);
10331044
$explode_field_value = explode(':',$field_value);
10341045
if (count($sql_v6_explode) < count($explode_field_value) && isset($sql_v6['ip_address'])) {
@@ -1233,7 +1244,7 @@ protected function _getSQL($record, $tab, $action = 'INSERT', $primary_id = 0, $
12331244
}
12341245
} else {
12351246
$sql_insert_key .= "`$key`, ";
1236-
$sql_insert_val .= "'".$record[$key]."', ";
1247+
$sql_insert_val .= (is_null($record[$key]) ? 'NULL' : "'".$record[$key]."'") . ", ";
12371248
}
12381249
} else {
12391250
if($field['formtype'] == 'PASSWORD') {
@@ -1260,7 +1271,7 @@ protected function _getSQL($record, $tab, $action = 'INSERT', $primary_id = 0, $
12601271
$sql_update .= "`$key` = '".$record[$key]."', ";
12611272
}
12621273
} else {
1263-
$sql_update .= "`$key` = '".$record[$key]."', ";
1274+
$sql_update .= "`$key` = " . (is_null($record[$key]) ? 'NULL' : "'".$record[$key]."'") . ", ";
12641275
}
12651276
}
12661277
} else {

interface/web/admin/lib/lang/de_server_config.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ $wb['awstats_settings_txt'] = 'AWStats Einstellungen';
173173
$wb['backup_mode_txt'] = 'Backupmodus';
174174
$wb['backup_mode_userzip'] = 'Backup Dateien gehören dem Web Benutzer (.zip Datei)';
175175
$wb['backup_mode_rootgz'] = 'Backup aller Dateien des Webverzeichnisses als Root Benutzer';
176+
$wb['backup_time_txt'] = 'Backupzeit';
176177
$wb['firewall_txt'] = 'Firewall';
177178
$wb['mailbox_quota_stats_txt'] = 'E-Mailkonto Beschränkung Statistiken';
178179
$wb['enable_ip_wildcard_txt'] = 'IP Adressen Wildcard (*) aktivieren';

interface/web/admin/lib/lang/en_server_config.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ $wb["fastcgi_config_syntax_txt"] = 'FastCGI config syntax';
101101
$wb["backup_mode_txt"] = 'Backup mode';
102102
$wb["backup_mode_userzip"] = 'Backup web files owned by web user as zip';
103103
$wb["backup_mode_rootgz"] = 'Backup all files in web directory as root user';
104+
$wb["backup_time_txt"] = 'Backup time';
104105
$wb["server_type_txt"] = 'Server Type';
105106
$wb["nginx_vhost_conf_dir_txt"] = 'Nginx Vhost config dir';
106107
$wb["nginx_vhost_conf_enabled_dir_txt"] = 'Nginx Vhost config enabled dir';

interface/web/admin/templates/system_config_domains_edit.htm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ <h1><tmpl_var name="list_head_txt"></h1>
66
<tmpl_if name="list_desc_txt"><p><tmpl_var name="list_desc_txt"></p></tmpl_if>
77

88
<div class="form-group">
9-
<div style="float:left;width:100%">
10-
<p class="label" style="width:270px">{tmpl_var name='use_domain_module_txt'}</p>
11-
<div class="col-sm-9">
12-
{tmpl_var name='use_domain_module'}
13-
</div>
9+
<div class="col-sm-3 text-right">
10+
{tmpl_var name='use_domain_module'}
11+
</div>
12+
<div class="col-sm-9">
13+
<p><strong>{tmpl_var name='use_domain_module_txt'}</strong></p>
14+
<p>{tmpl_var name='use_domain_module_hint'}</p>
1415
</div>
15-
<div style="float:left;width:500px;margin-top:20px">{tmpl_var name='use_domain_module_hint'}</div>
1616
</div>
1717
<div class="form-group">
1818
<label class="col-sm-3 control-label">{tmpl_var name='new_domain_txt'}</label>

interface/web/client/form/client.tform.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,7 @@
594594
'class'=> 'custom_datasource',
595595
'function'=> 'client_servers'
596596
),
597-
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
598-
'errmsg'=> 'no_mail_server_error'),
599-
1 => array ( 'type' => 'CUSTOM',
597+
'validators' => array ( 0 => array ( 'type' => 'CUSTOM',
600598
'class' => 'validate_client',
601599
'function' => 'check_used_servers',
602600
'errmsg'=> 'mail_servers_used'),
@@ -919,9 +917,7 @@
919917
'class'=> 'custom_datasource',
920918
'function'=> 'client_servers'
921919
),
922-
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
923-
'errmsg'=> 'no_web_server_error'),
924-
1 => array ( 'type' => 'CUSTOM',
920+
'validators' => array ( 0 => array ( 'type' => 'CUSTOM',
925921
'class' => 'validate_client',
926922
'function' => 'check_used_servers',
927923
'errmsg'=> 'web_servers_used'),
@@ -1141,9 +1137,7 @@
11411137
'class'=> 'custom_datasource',
11421138
'function'=> 'client_servers'
11431139
),
1144-
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
1145-
'errmsg'=> 'no_dns_server_error'),
1146-
1 => array ( 'type' => 'CUSTOM',
1140+
'validators' => array ( 0 => array ( 'type' => 'CUSTOM',
11471141
'class' => 'validate_client',
11481142
'function' => 'check_used_servers',
11491143
'errmsg'=> 'dns_servers_used'),
@@ -1238,9 +1232,7 @@
12381232
'class'=> 'custom_datasource',
12391233
'function'=> 'client_servers'
12401234
),
1241-
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
1242-
'errmsg'=> 'no_db_server_error'),
1243-
1 => array ( 'type' => 'CUSTOM',
1235+
'validators' => array ( 0 => array ( 'type' => 'CUSTOM',
12441236
'class' => 'validate_client',
12451237
'function' => 'check_used_servers',
12461238
'errmsg'=> 'db_servers_used'),

0 commit comments

Comments
 (0)