Commit e32c871f authored by Marius Burkard's avatar Marius Burkard

Merge branch 'stable-3.1'

parents 4382fdce 02fde680
......@@ -722,6 +722,12 @@ class installer_dist extends installer_base {
$tpl = new tpl('apache_ispconfig.conf.master');
$tpl->setVar('apache_version',getapacheversion());
if($this->is_update == true) {
$tpl->setVar('logging',get_logging_state());
} else {
$tpl->setVar('logging','yes');
}
$records = $this->db->queryAllRecords("SELECT * FROM ?? WHERE server_id = ? AND virtualhost = 'y'", $conf['mysql']['master_database'] . '.server_ip', $conf['server_id']);
$ip_addresses = array();
......@@ -806,6 +812,17 @@ class installer_dist extends installer_base {
//* add a sshusers group
$command = 'groupadd sshusers';
if(!is_group('sshusers')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
// add anonymized log option to nginxx.conf file
$nginx_conf_file = $conf['nginx']['config_dir'].'/nginx.conf';
if(is_file($nginx_conf_file)) {
$tmp = file_get_contents($nginx_conf_file);
if(!stristr($tmp, 'log_format anonymized')) {
copy($nginx_conf_file,$nginx_conf_file.'~');
replaceLine($nginx_conf_file, 'http {', "http {\n\n".file_get_contents('tpl/nginx_anonlog.master'), 0, 0);
}
}
}
public function configure_bastille_firewall()
......
......@@ -603,6 +603,12 @@ class installer extends installer_base
$tpl = new tpl('apache_ispconfig.conf.master');
$tpl->setVar('apache_version',getapacheversion());
if($this->is_update == true) {
$tpl->setVar('logging',get_logging_state());
} else {
$tpl->setVar('logging','yes');
}
$records = $this->db->queryAllRecords("SELECT * FROM ?? WHERE server_id = ? AND virtualhost = 'y'", $conf['mysql']['master_database'] . '.server_ip', $conf['server_id']);
$ip_addresses = array();
......
......@@ -691,6 +691,12 @@ class installer_dist extends installer_base {
$tpl = new tpl('apache_ispconfig.conf.master');
$tpl->setVar('apache_version',getapacheversion());
if($this->is_update == true) {
$tpl->setVar('logging',get_logging_state());
} else {
$tpl->setVar('logging','yes');
}
$records = $this->db->queryAllRecords("SELECT * FROM ?? WHERE server_id = ? AND virtualhost = 'y'", $conf['mysql']['master_database'] . '.server_ip', $conf['server_id']);
$ip_addresses = array();
......@@ -817,6 +823,16 @@ class installer_dist extends installer_base {
//* add a sshusers group
$command = 'groupadd sshusers';
if(!is_group('sshusers')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
// add anonymized log option to nginxx.conf file
$nginx_conf_file = $conf['nginx']['config_dir'].'/nginx.conf';
if(is_file($nginx_conf_file)) {
$tmp = file_get_contents($nginx_conf_file);
if(!stristr($tmp, 'log_format anonymized')) {
copy($nginx_conf_file,$nginx_conf_file.'~');
replaceLine($nginx_conf_file, 'http {', "http {\n\n".file_get_contents('tpl/nginx_anonlog.master'), 0, 0);
}
}
}
public function configure_bastille_firewall()
......
......@@ -99,6 +99,9 @@ require_once 'lib/classes/tpl.inc.php';
die('We will stop here. There is already a ISPConfig installation, use the update script to update this installation.');
}*/
// Patch is required to reapir latest amavis versions
if(is_installed('amavisd-new') && !is_installed('patch')) die('The patch command is missing. Install patch command and start installation again.');
//** Get distribution identifier
$dist = get_distname();
......
......@@ -97,6 +97,10 @@ function get_distname() {
$mainver = current($mainver).'.'.next($mainver);
}
switch ($mainver){
case "18.04":
$relname = "(Bionic Beaver)";
$distconfid = 'ubuntu1804';
break;
case "17.10":
$relname = "(Artful Aardvark)";
$distconfid = 'ubuntu1710';
......@@ -874,6 +878,28 @@ function is_ispconfig_ssl_enabled() {
}
}
/*
* Is anonymization enabled in ispconfig.conf file
*/
function get_logging_state() {
global $conf;
$ispconfig_conf_file = $conf['apache']['vhost_conf_dir'].'/ispconfig.conf';
if(is_file($ispconfig_conf_file)) {
$tmp = file_get_contents($ispconfig_conf_file);
if(stristr($tmp, '/usr/local/ispconfig/server/scripts/vlogger -p -s access.log')) {
return 'anon';
} elseif(stristr($tmp, '/usr/local/ispconfig/server/scripts/vlogger -s access.log')) {
return 'yes';
} else {
return 'no';
}
} else {
return 'yes';
}
}
/**
Function to find the hash file for timezone detection
(c) 2012 Marius Cramer, pixcept KG, m.cramer@pixcept.de
......
......@@ -226,8 +226,15 @@ class installer_base {
public function configure_database() {
global $conf;
//* ensure no modes with errors for ENGINE=MyISAM
$this->db->query("SET sql_mode = ''");
//* check sql-mode
/*$check_sql_mode = $this->db->queryOneRecord("SELECT @@sql_mode");
if ($check_sql_mode['@@sql_mode'] != '' && $check_sql_mode['@@sql_mode'] != 'NO_ENGINE_SUBSTITUTION') {
echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n";
echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n";
echo"to the mysqld-section in your mysql-config on this server and restart mysqld afterwards\n";
die();
}*/
$unwanted_sql_plugins = array('validate_password');
$sql_plugins = $this->db->queryAllRecords("SELECT plugin_name FROM information_schema.plugins WHERE plugin_status='ACTIVE' AND plugin_name IN ?", $unwanted_sql_plugins);
......@@ -250,10 +257,10 @@ class installer_base {
$this->error('Stopped: Database already contains some tables.');
} else {
if($conf['mysql']['admin_password'] == '') {
caselog("mysql --default-character-set=".escapeshellarg($conf['mysql']['charset'])." -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." ".escapeshellarg($conf['mysql']['database'])." < '".ISPC_INSTALL_ROOT."/install/sql/ispconfig3.sql' &> /dev/null",
caselog("mysql --default-character-set=".escapeshellarg($conf['mysql']['charset'])." -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -P ".escapeshellarg($conf['mysql']['port'])." ".escapeshellarg($conf['mysql']['database'])." < '".ISPC_INSTALL_ROOT."/install/sql/ispconfig3.sql' &> /dev/null",
__FILE__, __LINE__, 'read in ispconfig3.sql', 'could not read in ispconfig3.sql');
} else {
caselog("mysql --default-character-set=".escapeshellarg($conf['mysql']['charset'])." -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -p".escapeshellarg($conf['mysql']['admin_password'])." ".escapeshellarg($conf['mysql']['database'])." < '".ISPC_INSTALL_ROOT."/install/sql/ispconfig3.sql' &> /dev/null",
caselog("mysql --default-character-set=".escapeshellarg($conf['mysql']['charset'])." -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -p".escapeshellarg($conf['mysql']['admin_password'])." -P ".escapeshellarg($conf['mysql']['port'])." ".escapeshellarg($conf['mysql']['database'])." < '".ISPC_INSTALL_ROOT."/install/sql/ispconfig3.sql' &> /dev/null",
__FILE__, __LINE__, 'read in ispconfig3.sql', 'could not read in ispconfig3.sql');
}
$db_tables = $this->db->getTables();
......@@ -1981,6 +1988,14 @@ class installer_base {
$vhost_conf_enabled_dir = $conf['apache']['vhost_conf_enabled_dir'];
$tpl = new tpl('apache_ispconfig.conf.master');
$tpl->setVar('apache_version',getapacheversion());
if($this->is_update == true) {
$tpl->setVar('logging',get_logging_state());
} else {
$tpl->setVar('logging','yes');
}
$tpl->setVar('apache_version',getapacheversion(true));
$records = $this->db->queryAllRecords("SELECT * FROM ?? WHERE server_id = ? AND virtualhost = 'y'", $conf['mysql']['master_database'] . '.server_ip', $conf['server_id']);
......@@ -2066,6 +2081,17 @@ class installer_base {
//* add a sshusers group
$command = 'groupadd sshusers';
if(!is_group('sshusers')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
// add anonymized log option to nginxx.conf file
$nginx_conf_file = $conf['nginx']['config_dir'].'/nginx.conf';
if(is_file($nginx_conf_file)) {
$tmp = file_get_contents($nginx_conf_file);
if(!stristr($tmp, 'log_format anonymized')) {
copy($nginx_conf_file,$nginx_conf_file.'~');
replaceLine($nginx_conf_file, 'http {', "http {\n\n".file_get_contents('tpl/nginx_anonlog.master'), 0, 0);
}
}
}
public function configure_fail2ban() {
......@@ -2239,6 +2265,11 @@ class installer_base {
$tpl->setVar('apps_vhost_basedir',$conf['web']['website_basedir']);
$tpl->setVar('apps_vhost_servername',$apps_vhost_servername);
$tpl->setVar('apache_version',getapacheversion());
if($this->is_update == true) {
$tpl->setVar('logging',get_logging_state());
} else {
$tpl->setVar('logging','yes');
}
// comment out the listen directive if port is 80 or 443
......@@ -2322,7 +2353,12 @@ class installer_base {
$content = str_replace('{fpm_socket}', $fpm_socket, $content);
$content = str_replace('{cgi_socket}', $cgi_socket, $content);
if(file_exists('/var/run/php5-fpm.sock') || file_exists('/var/run/php/php7.0-fpm.sock')){
if( file_exists('/var/run/php5-fpm.sock')
|| file_exists('/var/run/php/php7.0-fpm.sock')
|| file_exists('/var/run/php/php7.1-fpm.sock')
|| file_exists('/var/run/php/php7.2-fpm.sock')
|| file_exists('/var/run/php/php7.3-fpm.sock')
){
$use_tcp = '#';
$use_socket = '';
} else {
......
......@@ -82,9 +82,9 @@ function prepareDBDump() {
if ($conf['powerdns']['installed']) {
//** export the current PowerDNS database data
if( !empty($conf["mysql"]["admin_password"]) ) {
system("mysqldump -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -p".escapeshellarg($conf['mysql']['admin_password'])." -c -t --add-drop-table --create-options --quick --result-file=existing_powerdns_db.sql ".$conf['powerdns']['database']);
system("mysqldump -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -p".escapeshellarg($conf['mysql']['admin_password'])." -P ".escapeshellarg($conf['mysql']['port'])." -c -t --add-drop-table --create-options --quick --result-file=existing_powerdns_db.sql ".$conf['powerdns']['database']);
} else {
system("mysqldump -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -c -t --add-drop-table --create-options --quick --result-file=existing_powerdns_db.sql ".$conf['powerdns']['database']);
system("mysqldump -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -P ".escapeshellarg($conf['mysql']['port'])." -c -t --add-drop-table --create-options --quick --result-file=existing_powerdns_db.sql ".$conf['powerdns']['database']);
}
// create a backup copy of the PowerDNS database in the root folder
......@@ -103,7 +103,7 @@ function checkDbHealth() {
$notok = array();
echo "Checking ISPConfig database .. ";
exec("mysqlcheck -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -p".escapeshellarg($conf['mysql']['admin_password'])." -r ".escapeshellarg($conf["mysql"]["database"]), $result);
exec("mysqlcheck -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -p".escapeshellarg($conf['mysql']['admin_password'])." -P ".escapeshellarg($conf['mysql']['port'])." -r ".escapeshellarg($conf["mysql"]["database"]), $result);
for( $i=0; $i<sizeof($result);$i++) {
if ( substr($result[$i], -2) != "OK" ) {
$notok[] = $result[$i];
......@@ -125,8 +125,15 @@ function checkDbHealth() {
function updateDbAndIni() {
global $inst, $conf;
//* ensure no modes with errors for ENGINE=MyISAM
$inst->db->query("SET sql_mode = ''");
//* check sql-mode
/*
$check_sql_mode = $inst->db->queryOneRecord("SELECT @@sql_mode");
if ($check_sql_mode['@@sql_mode'] != '' && $check_sql_mode['@@sql_mode'] != 'NO_ENGINE_SUBSTITUTION') {
echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n";
echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n";
echo"to the mysqld-section in your mysql-config on this server and restart mysqld afterwards\n";
die();
}*/
$unwanted_sql_plugins = array('validate_password');
$sql_plugins = $inst->db->queryAllRecords("SELECT plugin_name FROM information_schema.plugins WHERE plugin_status='ACTIVE' AND plugin_name IN ?", $unwanted_sql_plugins);
......@@ -203,9 +210,9 @@ function updateDbAndIni() {
//* Load patch file into database
if( !empty($conf["mysql"]["admin_password"]) ) {
$cmd = "mysql --default-character-set=".escapeshellarg($conf['mysql']['charset'])." --force -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -p".escapeshellarg($conf['mysql']['admin_password'])." ".escapeshellarg($conf['mysql']['database'])." < ".$sql_patch_filename;
$cmd = "mysql --default-character-set=".escapeshellarg($conf['mysql']['charset'])." --force -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -p".escapeshellarg($conf['mysql']['admin_password'])." -P ".escapeshellarg($conf['mysql']['port'])." ".escapeshellarg($conf['mysql']['database'])." < ".$sql_patch_filename;
} else {
$cmd = "mysql --default-character-set=".escapeshellarg($conf['mysql']['charset'])." --force -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." ".escapeshellarg($conf['mysql']['database'])." < ".$sql_patch_filename;
$cmd = "mysql --default-character-set=".escapeshellarg($conf['mysql']['charset'])." --force -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -P ".escapeshellarg($conf['mysql']['port'])." ".escapeshellarg($conf['mysql']['database'])." < ".$sql_patch_filename;
}
if(in_array($next_db_version,explode(',',$silent_update_versions))) {
......
ALTER TABLE `web_domain` ADD COLUMN `ssl_letsencrypt_exclude` enum('n','y') NOT NULL DEFAULT 'n' AFTER `ssl_letsencrypt`;
ALTER TABLE `remote_user` ADD `remote_access` ENUM('y','n') NOT NULL DEFAULT 'y' AFTER `remote_password`;
ALTER TABLE `remote_user` ADD `remote_ips` TEXT AFTER `remote_access`;
ALTER TABLE `server_php` ADD `active` enum('y','n') NOT NULL DEFAULT 'y' AFTER `php_fpm_pool_dir`;
ALTER TABLE `web_domain` CHANGE `log_retention` `log_retention` INT(11) NOT NULL DEFAULT '10';
\ No newline at end of file
<<<<<<< HEAD
ALTER TABLE `mail_mailinglist` ADD `list_type` enum('open','closed') NOT NULL DEFAULT 'open';
ALTER TABLE `mail_mailinglist` ADD `subject_prefix` varchar(50) NOT NULL DEFAULT '';
ALTER TABLE `mail_mailinglist` ADD `admins` mediumtext;
......@@ -94,8 +93,6 @@ ALTER TABLE `remote_user` ADD `remote_ips` TEXT AFTER `remote_access`;
ALTER TABLE `web_domain` ADD `php_fpm_chroot` enum('n','y') NOT NULL DEFAULT 'n' AFTER `php_fpm_use_socket`;
ALTER TABLE `client_template`
ADD COLUMN `limit_xmpp_webpresence` ENUM( 'n', 'y' ) NOT NULL default 'y',
ADD COLUMN `limit_xmpp_http_upload` ENUM( 'n', 'y' ) NOT NULL default 'n';
......
......@@ -1430,6 +1430,7 @@ CREATE TABLE `server_php` (
`php_fpm_init_script` varchar(255) DEFAULT NULL,
`php_fpm_ini_dir` varchar(255) DEFAULT NULL,
`php_fpm_pool_dir` varchar(255) DEFAULT NULL,
`active` enum('n','y') NOT NULL DEFAULT 'y',
PRIMARY KEY (`server_php_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
......@@ -2076,7 +2077,7 @@ CREATE TABLE `web_domain` (
`http_port` int(11) unsigned NOT NULL DEFAULT '80',
`https_port` int(11) unsigned NOT NULL DEFAULT '443',
`folder_directive_snippets` text,
`log_retention` int(11) NOT NULL DEFAULT '30',
`log_retention` int(11) NOT NULL DEFAULT '10',
PRIMARY KEY (`domain_id`),
UNIQUE KEY `serverdomain` ( `server_id` , `ip_address`, `domain` )
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
......
......@@ -34,6 +34,21 @@
</Directory>
</IfModule>
<IfModule mod_php7.c>
DocumentRoot {tmpl_var name='apps_vhost_dir'}
AddType application/x-httpd-php .php
<Directory {tmpl_var name='apps_vhost_dir'}>
Options FollowSymLinks
AllowOverride None
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory>
</IfModule>
<IfModule mod_fcgid.c>
DocumentRoot {tmpl_var name='apps_vhost_dir'}
SuexecUserGroup ispapps ispapps
......
......@@ -18,8 +18,12 @@ SSLStaplingCache shmcb:/var/run/ocsp(128000)
LogFormat '%v %h %l %u %t "%r" %>s %S "%{Referer}i" "%{User-Agent}i"' combined_ispconfig
<tmpl_else>
LogFormat "%v %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
<tmpl_if name='logging' op='==' value='anon'>
CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -p -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig env=!dontlog
</tmpl_if>
<tmpl_if name='logging' op='==' value='yes'>
CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig env=!dontlog
</tmpl_if>
CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig
<Directory /var/www/clients>
AllowOverride None
......
map $remote_addr $ip_anonym1 {
default 0.0.0;
"~(?P<ip>(\d+)\.(\d+)\.(\d+))\.\d+" $ip;
"~(?P<ip>[^:]+:[^:]+):" $ip;
}
map $remote_addr $ip_anonym2 {
default .0;
"~(?P<ip>(\d+)\.(\d+)\.(\d+))\.\d+" .0;
"~(?P<ip>[^:]+:[^:]+):" ::;
}
map $ip_anonym1$ip_anonym2 $ip_anonymized {
default 0.0.0.0;
"~(?P<ip>.*)" $ip;
}
log_format anonymized '$ip_anonymized - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
......@@ -29,6 +29,7 @@ munin_user=
munin_password=
monitor_system_updates=y
migration_mode=n
log_retention=10
[mail]
module=postfix_mysql
......@@ -114,6 +115,7 @@ overquota_notify_freq=7
overquota_db_notify_admin=y
overquota_db_notify_client=y
overquota_notify_onok=n
logging=yes
[dns]
bind_user=root
......
......@@ -98,6 +98,9 @@ if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) {
die('This software cannot be installed on a server wich runs ISPConfig 2.x.');
}
// Patch is required to reapir latest amavis versions
if(is_installed('amavisd-new') && !is_installed('patch')) die('The patch command is missing. Install patch command and start update again.');
//** Get distribution identifier
$dist = get_distname();
......@@ -157,6 +160,8 @@ $conf["mysql"]["database"] = $conf_old["db_database"];
$conf['mysql']['charset'] = 'utf8';
$conf["mysql"]["ispconfig_user"] = $conf_old["db_user"];
$conf["mysql"]["ispconfig_password"] = $conf_old["db_password"];
$conf['mysql']['port'] = $conf_old["db_port"];
if($conf['mysql']['port'] == 0 || $conf['mysql']['port'] == '') $conf['mysql']['port'] = 3306;
$conf['language'] = $conf_old['language'];
$conf['theme'] = $conf_old['theme'];
if($conf['language'] == '{language}') $conf['language'] = 'en';
......
......@@ -34,6 +34,7 @@ class ini_parser{
//* Converts a ini string to array
public function parse_ini_string($ini) {
$this->config = array();
$ini = str_replace("\r\n", "\n", $ini);
$lines = explode("\n", $ini);
foreach($lines as $line) {
......
......@@ -48,7 +48,7 @@ class remoting_admin extends remoting {
* @param array permissions
* @author "ispcomm", improved by M. Cramer <m.cramer@pixcept.de>
*/
public function update_record_permissions($tablename, $index_field, $index_value, $permissions) {
public function update_record_permissions($session_id, $tablename, $index_field, $index_value, $permissions) {
global $app;
if(!$this->checkPerm($session_id, 'admin_record_permissions')) {
......
This diff is collapsed.
......@@ -142,11 +142,13 @@ class remoting {
// get the ip for a hostname
unset($allowed_ips[$i]);
$temp=dns_get_record($allowed, DNS_A+DNS_AAAA);
foreach($temp as $t) {
if(isset($t['ip'])) $allowed_ips[] = $t['ip'];
if(isset($t['ipv6'])) $allowed_ips[] = $t['ipv6'];
if(is_array($temp) && !empty($temp)) {
foreach($temp as $t) {
if(isset($t['ip'])) $allowed_ips[] = $t['ip'];
if(isset($t['ipv6'])) $allowed_ips[] = $t['ipv6'];
}
unset($temp);
}
unset($temp);
}
}
$allowed_ips[] = '127.0.0.1';
......
......@@ -13339,6 +13339,7 @@ class SimplePie_Parse_Date
// Convert the number of seconds to an integer, taking decimals into account
$second = round($match[6] + (float)$match[7] / pow(10, (int)strlen($match[7])));
$second = @round($match[6] + $match[7] / @pow(10, strlen($match[7])));
return gmmktime($match[4], $match[5], $second, $match[2], $match[3], $match[1]) - $timezone;
}
......
......@@ -145,7 +145,7 @@ $wb['strength_2'] = 'Средний';
$wb['strength_3'] = 'Хороший';
$wb['strength_4'] = 'Стойкий';
$wb['strength_5'] = 'Очень стойкий';
$wb['weak_password_txt'] = 'Выбранный пароль не соответствует требованиям безопасности. Он должен быть как минимум {chars} символов в длину и стойкость \"{strength}\".';
$wb['weak_password_txt'] = 'Выбранный пароль не соответствует требованиям безопасности. Он должен быть как минимум {chars} символов в длину и стойкость \\"{strength}\\".';
$wb['weak_password_length_txt'] = 'Выбранный пароль не соответствует требованиям безопасности. Он должен быть как минимум {chars} символов в длину.';
$wb['security_check1_txt'] = 'Проверка разрешений безопасности:';
$wb['security_check2_txt'] = 'не удалось.';
......
......@@ -190,7 +190,7 @@ $form["tabs"]['server'] = array(
'validators' => array( 0 => array('type' => 'NOTEMPTY',
'errmsg' => 'tmpdir_path_error_empty'),
1 => array ( 'type' => 'REGEX',
'regex' => "/^\/[a-zA-Z0-9\.\-\_\/]{4,128}$/",
'regex' => "/^\/[a-zA-Z0-9\.\-\_\/]{3,128}$/",
'errmsg'=> 'tmpdir_path_error_regex'),
),
'value' => '',
......@@ -423,6 +423,17 @@ $form["tabs"]['server'] = array(
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'log_retention' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'ISPOSITIVE',
'errmsg'=> 'log_retention_error_ispositive'),
),
'default' => '30',
'value' => '',
'width' => '4',
'maxlength' => '4'
),
'migration_mode' => array(
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
......@@ -848,6 +859,12 @@ $form["tabs"]['web'] = array(
'width' => '40',
'maxlength' => '255'
),
'nginx_enable_pagespeed' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'n',
'value' => array(0 => 'n',1 => 'y')
),
'nginx_vhost_conf_dir' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
......@@ -938,6 +955,12 @@ $form["tabs"]['web'] = array(
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'logging' => array(
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'yes',
'value' => array('yes' => 'Yes', 'anon' => 'Anonymize IP', 'no' => 'No')
),
'overtraffic_notify_admin' => array(
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
......
......@@ -124,6 +124,13 @@ $form["tabs"]['php_name'] = array (