Commit 2f12afd1 authored by Marius Burkard's avatar Marius Burkard
Browse files

Merge branch 'stable-3.1'

parents 3e83d199 71066ac6
......@@ -134,6 +134,10 @@ class installer extends installer_base {
$content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content);
$content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content);
$content = str_replace('{server_id}', $conf['server_id'], $content);
# enable iterate_query for dovecot2
if(version_compare($dovecot_version,2, '>=')) {
$content = str_replace('# iterate_query', 'iterate_query', $content);
}
wf($config_dir.'/'.$configfile, $content);
chmod($config_dir.'/'.$configfile, 0600);
......
......@@ -557,7 +557,7 @@ if($install_mode == 'standard' || strtolower($inst->simple_query('Install ISPCon
$check = false;
do {
unset($temp_password);
$temp_password = $inst->free_query('Re-enter admin password', '');
$temp_password = $inst->free_query('Re-enter admin password', '','ispconfig_admin_password');
$check = @($temp_password == $conf['interface_password'])?true:false;
if(!$check) swriteln('Passwords do not match.');
} while (!$check);
......
......@@ -2453,6 +2453,12 @@ class installer_base {
//* chown the interface files to the ispconfig user and group
$command = 'chown -R ispconfig:ispconfig '.$install_dir.'/interface';
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
//* Chmod the files and directories in the acme dir with nginx installed
if($conf['nginx']['installed'] == true) {
$command = 'chmod -R 755 '.$install_dir.'/interface/acme';
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
}
//* chown the server files to the root user and group
$command = 'chown -R root:root '.$install_dir.'/server';
......
......@@ -9,7 +9,9 @@ ALTER TABLE `mail_mailinglist` ADD `digestsub` ENUM('n','y') NOT NULL DEFAULT 'n
ALTER TABLE `mail_mailinglist` ADD `mail_footer` mediumtext;
ALTER TABLE `mail_mailinglist` ADD `subscribe_policy` enum('disabled','confirm','approval','both','none') NOT NULL DEFAULT 'confirm';
ALTER TABLE `mail_mailinglist` ADD `posting_policy` enum('closed','moderated','free') NOT NULL DEFAULT 'free';
ALTER TABLE `web_domain` CHANGE `folder_directive_snippets` `folder_directive_snippets` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL;
ALTER TABLE `sys_user` ADD `last_login_ip` VARCHAR(50) NULL AFTER `lost_password_reqtime`;
ALTER TABLE `sys_user` ADD `last_login_at` BIGINT(20) NULL AFTER `last_login_ip`;
ALTER TABLE `sys_remoteaction` CHANGE `action_state` `action_state` ENUM('pending','processing','ok','warning','error') NOT NULL DEFAULT 'pending';
\ No newline at end of file
ALTER TABLE `sys_remoteaction` CHANGE `action_state` `action_state` ENUM('pending','processing','ok','warning','error') NOT NULL DEFAULT 'pending';
ALTER TABLE `web_domain` CHANGE `folder_directive_snippets` `folder_directive_snippets` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL;
ALTER TABLE `web_domain` ADD `log_retention` INT NOT NULL DEFAULT '30' AFTER `https_port`;
ALTER TABLE `web_domain` CHANGE `stats_type` `stats_type` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'awstats';
......@@ -1968,7 +1968,7 @@ CREATE TABLE `web_domain` (
`ssl_key` mediumtext NULL,
`ssl_action` varchar(16) NULL,
`stats_password` varchar(255) default NULL,
`stats_type` varchar(255) default 'webalizer',
`stats_type` varchar(255) default 'awstats',
`allow_override` varchar(255) NOT NULL default 'All',
`apache_directives` mediumtext,
`nginx_directives` mediumtext,
......@@ -1999,6 +1999,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',
PRIMARY KEY (`domain_id`),
UNIQUE KEY `serverdomain` ( `server_id` , `ip_address`, `domain` )
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
......
......@@ -141,6 +141,9 @@ Alias /.well-known/acme-challenge /usr/local/ispconfig/interface/acme/.well-know
Order allow,deny
Allow from all
</tmpl_if>
<IfModule mpm_itk_module>
AssignUserId www-data www-data
</IfModule>
</Directory>
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>
......
......@@ -65,5 +65,5 @@ customer_no_start=1
customer_no_counter=0
session_timeout=0
session_allow_endless=0
min_password_length=5
min_password_strength=0
min_password_length=8
min_password_strength=3
......@@ -433,20 +433,17 @@ class ispcmail {
$textonly = true;
} elseif($text == true && $html == false && $attach == true) {
// text and attachment
$content_type = 'multipart/mixed;';
$content_type .= "\n" . ' boundary="' . $this->mime_boundary . '"';
$content_type = 'multipart/mixed; boundary="' . $this->mime_boundary . '"';
} elseif($html == true && $text == true && $attach == false) {
// html only (or text too)
$content_type = 'multipart/alternative;';
$content_type .= "\n" . ' boundary="' . $this->mime_boundary . '"';
$content_type = 'multipart/alternative; boundary="' . $this->mime_boundary . '"';
} elseif($html == true && $text == false && $attach == false) {
// html only (or text too)
$content_type = 'text/html; charset="' . strtolower($this->mail_charset) . '"';
$htmlonly = true;
} elseif($html == true && $attach == true) {
// html and attachments
$content_type = 'multipart/mixed;';
$content_type .= "\n" . ' boundary="' . $this->mime_boundary . '"';
$content_type = 'multipart/mixed; boundary="' . $this->mime_boundary . '"';
}
$this->headers['Content-Type'] = $content_type;
......@@ -475,8 +472,7 @@ class ispcmail {
if($attach) {
foreach($this->attachments as $att) {
$this->body .= "--{$this->mime_boundary}\n" .
"Content-Type: " . $att['type'] . ";\n" .
" name=\"" . $att['filename'] . "\"\n" .
"Content-Type: " . $att['type'] . "; name=\"" . $att['filename'] . "\"\n" .
"Content-Transfer-Encoding: base64\n" .
"Content-Disposition: attachment;\n\n" .
chunk_split(base64_encode($att['content'])) . "\n\n";
......
......@@ -153,7 +153,7 @@ class listform_actions {
$records_new = array_slice($records_new, $app->listform->getPagingValue('offset'), $app->listform->getPagingValue('records_per_page'));
}
$app->tpl->setLoop('records', $records_new);
if(is_array($records_new) && count($records_new) > 0) $app->tpl->setLoop('records', $records_new);
$this->onShow();
......
......@@ -427,6 +427,7 @@ class remoting_sites extends remoting {
if($params['document_root'] == '') $params['document_root'] = '-';
if($params['system_user'] == '') $params['system_user'] = '-';
if($params['system_group'] == '') $params['system_group'] = '-';
if($params['log_retention'] == '') $params['log_retention'] = 30;
//* Set a few defaults for nginx servers
if($params['pm_max_children'] == '') $params['pm_max_children'] = 1;
......@@ -447,6 +448,8 @@ class remoting_sites extends remoting {
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
if($params['log_retention'] == '') $params['log_retention'] = 30;
//* Set a few defaults for nginx servers
if($params['pm_max_children'] == '') $params['pm_max_children'] = 1;
......@@ -498,6 +501,7 @@ class remoting_sites extends remoting {
if($params['document_root'] == '') $params['document_root'] = '-';
if($params['system_user'] == '') $params['system_user'] = '-';
if($params['system_group'] == '') $params['system_group'] = '-';
if($params['log_retention'] == '') $params['log_retention'] = 30;
//* Set a few defaults for nginx servers
if($params['pm_max_children'] == '') $params['pm_max_children'] = 1;
......@@ -516,6 +520,8 @@ class remoting_sites extends remoting {
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
if($params['log_retention'] == '') $params['log_retention'] = 30;
//* Set a few defaults for nginx servers
if($params['pm_max_children'] == '') $params['pm_max_children'] = 1;
......@@ -567,6 +573,7 @@ class remoting_sites extends remoting {
if($params['document_root'] == '') $params['document_root'] = '-';
if($params['system_user'] == '') $params['system_user'] = '-';
if($params['system_group'] == '') $params['system_group'] = '-';
if($params['log_retention'] == '') $params['log_retention'] = 30;
//* Set a few defaults for nginx servers
if($params['pm_max_children'] == '') $params['pm_max_children'] = 1;
......@@ -585,6 +592,8 @@ class remoting_sites extends remoting {
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
if($params['log_retention'] == '') $params['log_retention'] = 30;
//* Set a few defaults for nginx servers
if($params['pm_max_children'] == '') $params['pm_max_children'] = 1;
......
......@@ -27,7 +27,7 @@ class mail_mail_domain_plugin {
function mail_mail_domain_edit($event_name, $page_form) {
global $app, $conf;
// make sure that the record belongs to the clinet group and not the admin group when a dmin inserts it
// make sure that the record belongs to the client group and not the admin group when a dmin inserts it
// also make sure that the user can not delete entry created by an admin
if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($page_form->dataRecord["client_group_id"])) {
$client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]);
......@@ -44,7 +44,7 @@ class mail_mail_domain_plugin {
}
if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($page_form->dataRecord["client_group_id"])) {
$client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]);
$updates = "sys_groupid = $client_group_id, sys_perm_group = 'riud'";
$updates = "sys_groupid = ?, sys_perm_group = 'riud'";
$update_params = array($client_group_id);
if ($event_name == 'mail:mail_domain:on_after_update') {
$tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = ?", $client_group_id);
......
......@@ -89,7 +89,7 @@ $form["tabs"]['php_name'] = array (
'formtype' => 'SELECT',
'default' => '',
'datasource' => array ( 'type' => 'SQL',
'querystring' => 'SELECT server_id,server_name FROM server WHERE mirror_server_id = 0 AND {AUTHSQL} ORDER BY server_name',
'querystring' => 'SELECT server_id,server_name FROM server WHERE mirror_server_id = 0 AND web_server = 1 AND {AUTHSQL} ORDER BY server_name',
'keyfield'=> 'server_id',
'valuefield'=> 'server_name'
),
......
......@@ -213,7 +213,7 @@ $wb['mailuser_group_name_error_regex'] = 'Invalid mailuser group name.';
$wb['mailuser_uid_error_range'] = 'Mailuser uid must be >= 2000';
$wb['mailuser_gid_error_range'] = 'Mailuser gid must be >= 2000';
$wb['getmail_config_dir_error_regex'] = 'Invalid getmail config directory.';
$wb['website_basedir_error_regex'] = 'Invalid website basedir.';
$wb['website_basedir_error_regex'] = 'Invalid website basedir or path too short, min. length 5 chars.';
$wb['website_symlinks_error_regex'] = 'Invalid website symlinks.';
$wb['vhost_conf_dir_error_regex'] = 'Invalid vhost config directory.';
$wb['vhost_conf_enabled_dir_error_regex'] = 'Invalid vhost conf enabled directory.';
......
......@@ -213,7 +213,7 @@ $wb['mailuser_group_name_error_regex'] = 'Invalid mailuser group name.';
$wb['mailuser_uid_error_range'] = 'Mailuser uid must be >= 2000';
$wb['mailuser_gid_error_range'] = 'Mailuser gid must be >= 2000';
$wb['getmail_config_dir_error_regex'] = 'Invalid getmail config directory.';
$wb['website_basedir_error_regex'] = 'Invalid website basedir.';
$wb['website_basedir_error_regex'] = 'Invalid website basedir or path too short, min. length 5 chars.';
$wb['website_symlinks_error_regex'] = 'Invalid website symlinks.';
$wb['vhost_conf_dir_error_regex'] = 'Invalid vhost config directory.';
$wb['vhost_conf_enabled_dir_error_regex'] = 'Invalid vhost conf enabled directory.';
......
......@@ -220,7 +220,7 @@ $wb['mailuser_group_name_error_regex'] = 'Invalid mailuser group name.';
$wb['mailuser_uid_error_range'] = 'Mailuser uid must be >= 2000';
$wb['mailuser_gid_error_range'] = 'Mailuser gid must be >= 2000';
$wb['getmail_config_dir_error_regex'] = 'Invalid getmail config directory.';
$wb['website_basedir_error_regex'] = 'Invalid website basedir.';
$wb['website_basedir_error_regex'] = 'Invalid website basedir or path too short, min. length 5 chars.';
$wb['website_symlinks_error_regex'] = 'Invalid website symlinks.';
$wb['vhost_conf_dir_error_regex'] = 'Invalid vhost config directory.';
$wb['vhost_conf_enabled_dir_error_regex'] = 'Invalid vhost conf enabled directory.';
......
......@@ -198,7 +198,7 @@ $wb['mailuser_group_name_error_regex'] = 'Invalid mailuser group name.';
$wb['mailuser_uid_error_range'] = 'Mailuser uid must be >= 2000';
$wb['mailuser_gid_error_range'] = 'Mailuser gid must be >= 2000';
$wb['getmail_config_dir_error_regex'] = 'Invalid getmail config directory.';
$wb['website_basedir_error_regex'] = 'Invalid website basedir.';
$wb['website_basedir_error_regex'] = 'Invalid website basedir or path too short, min. length 5 chars.';
$wb['website_symlinks_error_regex'] = 'Invalid website symlinks.';
$wb['vhost_conf_dir_error_regex'] = 'Invalid vhost config directory.';
$wb['vhost_conf_enabled_dir_error_regex'] = 'Invalid vhost conf enabled directory.';
......
......@@ -222,7 +222,7 @@ $wb['mailuser_group_name_error_regex'] = 'Invalid mailuser group name.';
$wb['mailuser_uid_error_range'] = 'Mailuser uid must be >= 2000';
$wb['mailuser_gid_error_range'] = 'Mailuser gid must be >= 2000';
$wb['getmail_config_dir_error_regex'] = 'Invalid getmail config directory.';
$wb['website_basedir_error_regex'] = 'Invalid website basedir.';
$wb['website_basedir_error_regex'] = 'Invalid website basedir or path too short, min. length 5 chars.';
$wb['website_symlinks_error_regex'] = 'Invalid website symlinks.';
$wb['vhost_conf_dir_error_regex'] = 'Invalid vhost config directory.';
$wb['vhost_conf_enabled_dir_error_regex'] = 'Invalid vhost conf enabled directory.';
......
......@@ -208,7 +208,7 @@ $wb['mailuser_group_name_error_regex'] = 'Invalid mailuser group name.';
$wb['mailuser_uid_error_range'] = 'Mailuser uid must be >= 2000';
$wb['mailuser_gid_error_range'] = 'Mailuser gid must be >= 2000';
$wb['getmail_config_dir_error_regex'] = 'Invalid getmail config directory.';
$wb['website_basedir_error_regex'] = 'Invalid website basedir.';
$wb['website_basedir_error_regex'] = 'Invalid website basedir or path too short, min. length 5 chars.';
$wb['website_symlinks_error_regex'] = 'Invalid website symlinks.';
$wb['vhost_conf_dir_error_regex'] = 'Invalid vhost config directory.';
$wb['vhost_conf_enabled_dir_error_regex'] = 'Invalid vhost conf enabled directory.';
......
......@@ -227,7 +227,7 @@ $wb['mailuser_group_name_error_regex'] = 'Invalid mailuser group name.';
$wb['mailuser_uid_error_range'] = 'Mailuser uid must be >= 2000';
$wb['mailuser_gid_error_range'] = 'Mailuser gid must be >= 2000';
$wb['getmail_config_dir_error_regex'] = 'Invalid getmail config directory.';
$wb['website_basedir_error_regex'] = 'Invalid website basedir.';
$wb['website_basedir_error_regex'] = 'Invalid website basedir path, min. length 5 chars.';
$wb['website_symlinks_error_regex'] = 'Invalid website symlinks.';
$wb['vhost_conf_dir_error_regex'] = 'Invalid vhost config directory.';
$wb['vhost_conf_enabled_dir_error_regex'] = 'Invalid vhost conf enabled directory.';
......
......@@ -213,7 +213,7 @@ $wb['mailuser_group_name_error_regex'] = 'Invalid mailuser group name.';
$wb['mailuser_uid_error_range'] = 'Mailuser uid must be >= 2000';
$wb['mailuser_gid_error_range'] = 'Mailuser gid must be >= 2000';
$wb['getmail_config_dir_error_regex'] = 'Invalid getmail config directory.';
$wb['website_basedir_error_regex'] = 'Invalid website basedir.';
$wb['website_basedir_error_regex'] = 'Invalid website basedir or path too short, min. length 5 chars.';
$wb['website_symlinks_error_regex'] = 'Invalid website symlinks.';
$wb['vhost_conf_dir_error_regex'] = 'Invalid vhost config directory.';
$wb['vhost_conf_enabled_dir_error_regex'] = 'Invalid vhost conf enabled directory.';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment