Commit 83bf799c authored by Marius Burkard's avatar Marius Burkard

Merge branch 'stable-3.1'

parents e1ceb050 cfc84755
......@@ -812,7 +812,7 @@ class installer_base {
public function get_postfix_service($service, $type) {
global $conf;
exec("postconf -M", $out, $ret);
exec("postconf -M 2> /dev/null", $out, $ret);
if ($ret === 0) { //* with postfix >= 2.9 we can detect configured services with postconf
unset($out);
......@@ -822,9 +822,9 @@ class installer_base {
}
$postfix_service = @($out[0]=='')?false:true;
} else { //* fallback - Postfix < 2.9
rf($conf['postfix']['config_dir'].'/master.cf');
$regex = '/[^#]'.$service.'.*.'.$type.'.*/';
$postfix_service = @(!preg_match($regex, $content))?true:false;
$content = rf($conf['postfix']['config_dir'].'/master.cf');
$regex = "/^((?!#)".$service.".*".$type.".*)$/m";
$postfix_service = @(preg_match($regex, $content))?true:false;
}
return $postfix_service;
......@@ -1366,21 +1366,25 @@ class installer_base {
// Add the clamav user to the amavis group
exec('adduser clamav amavis');
// Create the director for DKIM-Keys
if(!is_dir('/var/lib/amavis/dkim')) mkdir('/var/lib/amavis/dkim', 0750, true);
// get shell-user for amavis
$amavis_user=exec('grep -o "^amavis:\|^vscan:" /etc/passwd');
if(!empty($amavis_user)) {
$amavis_user=rtrim($amavis_user, ":");
exec('chown '.$amavis_user.' /var/lib/amavis/dkim');
}
// get shell-group for amavis
$amavis_group=exec('grep -o "^amavis:\|^vscan:" /etc/group');
if(!empty($amavis_group)) {
$amavis_group=rtrim($amavis_group, ":");
exec('chgrp '.$amavis_group.' /var/lib/amavis/dkim');
}
// get shell-user for amavis
$amavis_user=exec('grep -o "^amavis:\|^vscan:" /etc/passwd');
if(!empty($amavis_user)) {
$amavis_user=rtrim($amavis_user, ":");
}
// Create the director for DKIM-Keys
if(!is_dir('/var/lib/amavis')) mkdir('/var/lib/amavis', 0750, true);
if(!empty($amavis_user)) exec('chown '.$amavis_user.' /var/lib/amavis');
if(!empty($amavis_group)) exec('chgrp '.$amavis_group.' /var/lib/amavis');
if(!is_dir('/var/lib/amavis/dkim')) mkdir('/var/lib/amavis/dkim', 0750);
if(!empty($amavis_user)) exec('chown -R '.$amavis_user.' /var/lib/amavis/dkim');
if(!empty($amavis_group)) exec('chgrp -R '.$amavis_group.' /var/lib/amavis/dkim');
}
public function configure_spamassassin() {
......@@ -1693,7 +1697,7 @@ Email Address []:
if(is_file('/etc/suphp/suphp.conf')) {
replaceLine('/etc/suphp/suphp.conf', 'php="php:/usr/bin', 'x-httpd-suphp="php:/usr/bin/php-cgi"', 0);
//replaceLine('/etc/suphp/suphp.conf','docroot=','docroot=/var/clients',0);
replaceLine('/etc/suphp/suphp.conf', 'umask=0077', 'umask=0022', 0);
replaceLine('/etc/suphp/suphp.conf', 'umask=00', 'umask=0022', 0);
}
if(is_file('/etc/apache2/sites-enabled/000-default')) {
......
......@@ -15,6 +15,10 @@
SetHandler None
</FilesMatch>
<IfModule mod_headers.c>
RequestHeader unset Proxy early
</IfModule>
<IfModule mod_php5.c>
DocumentRoot {tmpl_var name='apps_vhost_dir'}
AddType application/x-httpd-php .php
......
......@@ -82,6 +82,7 @@ NameVirtualHost *:<tmpl_var name="vhost_port">
<IfModule mod_headers.c>
Header always add Strict-Transport-Security "max-age=15768000"
RequestHeader unset Proxy early
</IfModule>
<tmpl_if name='apache_version' op='>=' value='2.3.3' format='version'>
......
......@@ -40,6 +40,7 @@ server {
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param HTTP_PROXY "";
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
......
......@@ -36,6 +36,7 @@ server {
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_read_timeout 1200;
fastcgi_param HTTP_PROXY "";
}
location ~ /\. {
......
......@@ -305,6 +305,7 @@ class app {
//print_r($_SESSION);
if(isset($_SESSION['s']['module']['name'])) {
$this->tpl->setVar('app_module', $_SESSION['s']['module']['name']);
$this->tpl->setVar('session_module', $_SESSION['s']['module']['name']);
}
if(isset($_SESSION['s']['user']) && $_SESSION['s']['user']['typ'] == 'admin') {
$this->tpl->setVar('is_admin', 1);
......
......@@ -574,9 +574,13 @@ class ApsGUIController extends ApsBase
// Find out document_root and make sure no apps are installed twice to one location
if(in_array($postinput['main_domain'], $domains))
{
$docroot = $app->db->queryOneRecord("SELECT document_root FROM web_domain
$docroot = $app->db->queryOneRecord("SELECT document_root, web_folder FROM web_domain
WHERE domain = ?", $this->getMainDomain($postinput['main_domain']));
$new_path = $docroot['document_root'];
if(trim($docroot['web_folder']) == '') {
$new_path = $docroot['document_root'];
} else {
$new_path = $docroot['document_root'] . '/' . $docroot['web_folder'];
}
if(substr($new_path, -1) != '/') $new_path .= '/';
$new_path .= $main_location;
......
......@@ -213,7 +213,10 @@ class auth {
return str_shuffle($password);
}
public function crypt_password($cleartext_password) {
public function crypt_password($cleartext_password, $charset = 'UTF-8') {
if($charset != 'UTF-8') {
$cleartext_password = mb_convert_encoding($cleartext_password, $charset, 'UTF-8');
}
$salt="$1$";
$base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
for ($n=0;$n<8;$n++) {
......
......@@ -434,7 +434,7 @@ class remoting_sites extends remoting {
if($params['pm_min_spare_servers'] == '') $params['pm_min_spare_servers'] = 1;
if($params['pm_max_spare_servers'] == '') $params['pm_max_spare_servers'] = 1;
$domain_id = $this->insertQuery('../sites/form/web_vhost_domain.tform.php', $client_id, $params, 'sites:web_domain:on_after_insert');
$domain_id = $this->insertQuery('../sites/form/web_vhost_domain.tform.php', $client_id, $params, 'sites:web_vhost_domain:on_after_insert');
if ($readonly === true)
$app->db->query("UPDATE web_domain SET `sys_userid` = '1' WHERE domain_id = ?", $domain_id);
return $domain_id;
......
......@@ -284,7 +284,7 @@ class remoting_lib extends tform_base {
$startmodule=$_modules[0];
}
}
$usertheme = $params["usertheme"];
$usertheme = (isset($params["usertheme"]) && $params["usertheme"] != '')?$params["usertheme"]:'default';
$type = 'user';
$active = 1;
$insert_id = $app->functions->intval($insert_id);
......
......@@ -901,6 +901,9 @@ class tform_base {
case 'IDNTOUTF8':
$returnval = $app->functions->idn_decode($returnval);
break;
case 'TOLATIN1':
$returnval = mb_convert_encoding($returnval, 'ISO-8859-1', 'UTF-8');
break;
case 'TRIM':
$returnval = trim($returnval);
break;
......@@ -992,6 +995,26 @@ class tform_base {
}
}
break;
case 'ISDOMAIN':
$error = false;
if($validator['allowempty'] != 'y') $validator['allowempty'] = 'n';
if($validator['allowempty'] == 'y' && $field_value == '') {
//* Do nothing
} else {
if(function_exists('filter_var')) {
if(filter_var('check@'.$field_value, FILTER_VALIDATE_EMAIL) === false) {
$errmsg = $validator['errmsg'];
if(isset($this->wordbook[$errmsg])) {
$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
} else {
$this->errorMessage .= $errmsg."<br />\r\n";
}
}
} else $this->errorMessage .= "function filter_var missing <br />\r\n";
}
unset($error);
break;
case 'ISEMAIL':
$error = false;
if($validator['allowempty'] != 'y') $validator['allowempty'] = 'n';
......@@ -1243,6 +1266,10 @@ class tform_base {
} elseif(isset($field['encryption']) && $field['encryption'] == 'CRYPT') {
$record[$key] = $app->auth->crypt_password(stripslashes($record[$key]));
$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
} elseif(isset($field['encryption']) && $field['encryption'] == 'CRYPTMAIL') {
// The password for the mail system needs to be converted to latin1 before it is hashed.
$record[$key] = $app->auth->crypt_password(stripslashes($record[$key]),'ISO-8859-1');
$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
} elseif (isset($field['encryption']) && $field['encryption'] == 'MYSQL') {
$tmp = $app->db->queryOneRecord("SELECT PASSWORD(?) as `crypted`", stripslashes($record[$key]));
$record[$key] = $tmp['crypted'];
......@@ -1271,6 +1298,10 @@ class tform_base {
} elseif(isset($field['encryption']) && $field['encryption'] == 'CRYPT') {
$record[$key] = $app->auth->crypt_password(stripslashes($record[$key]));
$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
} elseif(isset($field['encryption']) && $field['encryption'] == 'CRYPTMAIL') {
// The password for the mail system needs to be converted to latin1 before it is hashed.
$record[$key] = $app->auth->crypt_password(stripslashes($record[$key]),'ISO-8859-1');
$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
} elseif (isset($field['encryption']) && $field['encryption'] == 'MYSQL') {
$tmp = $app->db->queryOneRecord("SELECT PASSWORD(?) as `crypted`", stripslashes($record[$key]));
$record[$key] = $tmp['crypted'];
......
......@@ -157,7 +157,7 @@ class tools_sites {
$field = "domain";
$select = $field;
}
$sql .= " domain NOT IN (SELECT $select FROM ?? WHERE $field != ?) AND";
$sql .= " domain NOT IN (SELECT $select FROM ?? WHERE $field = ?) AND";
}
if ($_SESSION["s"]["user"]["typ"] == 'admin') {
$sql .= " 1";
......
......@@ -80,8 +80,8 @@ class sites_web_vhost_domain_plugin {
$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ?", $app->functions->intval(@$page_form->dataRecord["client_group_id"]));
$client_id = $app->functions->intval($client["client_id"]);
} else {
$client_group_id = $page_form->dataRecord["client_group_id"];
$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ?", $app->functions->intval($page_form->dataRecord["client_group_id"]));
$tmp = $app->db->queryOneRecord('SELECT sys_groupid FROM web_domain WHERE domain_id = ?',$page_form->id);
$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ?", $app->functions->intval($tmp['sys_groupid']));
$client_id = $app->functions->intval($client["client_id"]);
}
......
......@@ -183,7 +183,7 @@ class page_action extends tform_actions {
* (only the first time!)
*/
if (($section == 'domains') &&
($_SESSION['use_domain_module_old_value'] == '') &&
($_SESSION['use_domain_module_old_value'] == '' || $_SESSION['use_domain_module_old_value'] == 'n') &&
($server_config_array['domains']['use_domain_module'] == 'y')){
$sql = "REPLACE INTO domain (sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, domain ) " .
"SELECT sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, domain " .
......
......@@ -149,7 +149,7 @@ class page_action extends tform_actions {
if (trim($item['client_template_id']) != ''){
if ($text != '') $text .= '';
$text .= '<li rel="' . $item['assigned_template_id'] . '">' . $tpl[$item['client_template_id']];
$text .= '<a href="#" class="button icons16 icoDelete"></a>';
$text .= '&nbsp;<a href="#" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></a>';
$tmp = new stdClass();
$tmp->id = $item['assigned_template_id'];
$tmp->data = '';
......@@ -173,7 +173,7 @@ class page_action extends tform_actions {
foreach($tplAdd as $item){
if (trim($item) != ''){
if ($text != '') $text .= '';
$text .= '<li>' . $tpl[$item]. '<a href="#" class="button icons16 icoDelete"></a></li>';
$text .= '<li>' . $tpl[$item]. '&nbsp;<a href="#" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></a></li>';
}
}
}
......
......@@ -635,6 +635,23 @@ $form["tabs"]['limits'] = array (
'value' => array(''),
'name' => 'default_dnsserver'
),*/
'dns_servers' => array (
'datatype' => 'VARCHAR',
'formtype' => 'MULTIPLE',
'separator' => ',',
'default' => '1',
'datasource' => array ( 'type' => 'CUSTOM',
'class'=> 'custom_datasource',
'function'=> 'client_servers'
),
'validators' => array ( 0 => array ( 'type' => 'CUSTOM',
'class' => 'validate_client',
'function' => 'check_used_servers',
'errmsg'=> 'dns_servers_used'),
),
'value' => '',
'name' => 'dns_servers'
),
'limit_dns_zone' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
......@@ -845,6 +862,20 @@ $form["tabs"]['limits'] = array (
'rows' => '',
'cols' => ''
),
'limit_domainmodule' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'ISINT',
'errmsg'=> 'limit_domainmodule_error_notint'),
),
'default' => '0',
'value' => '',
'separator' => '',
'width' => '10',
'maxlength' => '10',
'rows' => '',
'cols' => ''
),
//#################################
// END Datatable fields
//#################################
......
<?php
$wb['template_type_txt'] = 'Email type';
$wb['template_name_txt'] = 'Template name';
$wb['subject_txt'] = 'Subject';
$wb['message_txt'] = 'Message';
$wb['Email template'] = 'Email template';
$wb['Settings'] = 'Setting';
$wb['variables_txt'] = 'Variables';
$wb['variables_description_txt'] = '(The username and password variables are only available in welcome emails.)';
$wb['duplicate_welcome_error'] = 'There can be only one default welcome email template. Please edit the existing template instead of adding a new one.';
$wb['template_type_txt'] = 'Email-Typ';
$wb['template_name_txt'] = 'Name der Vorlage';
$wb['subject_txt'] = 'Betreff';
$wb['message_txt'] = 'Nachricht';
$wb['Email template'] = 'Email-Vorlage';
$wb['Settings'] = 'Einstellung';
$wb['variables_txt'] = 'Variable';
$wb['variables_description_txt'] = '(Die Benutzername und Passwort Variable können nur in Willkommensnachrichten verwendet werden.)';
$wb['duplicate_welcome_error'] = 'Es kann nur eine Standard Willkommensnachrichten Vorlage geben. Bitte bearbeiten Sie die bestehende Vorlage anstatt eine neue hinzuzufügen.';
?>
<?php
$wb['list_head_txt'] = 'Email templates';
$wb['template_type_txt'] = 'Message for';
$wb['template_name_txt'] = 'Template name';
$wb['list_head_txt'] = 'Email Vorlagen';
$wb['template_type_txt'] = 'Vorlage für';
$wb['template_name_txt'] = 'Name der Vorlage';
?>
......@@ -19,6 +19,7 @@ $wb["contact_firstname_txt"] = 'Contact firstname';
$wb["contact_name_txt"] = 'Contact name';
$wb["username_txt"] = 'Username';
$wb["password_txt"] = 'Password';
$wb['password_click_to_set_txt'] = 'Click to set';
$wb["password_strength_txt"] = 'Password strength';
$wb["language_txt"] = 'Language';
$wb["usertheme_txt"] = 'Theme';
......
......@@ -19,6 +19,7 @@ $wb["contact_firstname_txt"] = 'Contact firstname';
$wb["contact_name_txt"] = 'Contact name';
$wb["username_txt"] = 'Username';
$wb["password_txt"] = 'Password';
$wb['password_click_to_set_txt'] = 'Click to set';
$wb["password_strength_txt"] = 'Password strength';
$wb["language_txt"] = 'Language';
$wb["usertheme_txt"] = 'Theme';
......
......@@ -18,6 +18,7 @@ $wb['contact_firstname_txt'] = 'Contact firstname';
$wb['contact_name_txt'] = 'Contactpersoon';
$wb['username_txt'] = 'Gebruikersnaam';
$wb['password_txt'] = 'Wachtwoord';
$wb['password_click_to_set_txt'] = 'Klik om in te stellen';
$wb['password_strength_txt'] = 'Wachtwoord sterkte';
$wb['language_txt'] = 'Taal';
$wb['usertheme_txt'] = 'Thema';
......
......@@ -17,6 +17,7 @@ $wb['contact_firstname_txt'] = 'Contact firstname';
$wb['contact_name_txt'] = 'Contactpersoon';
$wb['username_txt'] = 'Gebruikersnaam';
$wb['password_txt'] = 'Wachtwoord';
$wb['password_click_to_set_txt'] = 'Klik om in te stellen';
$wb['password_strength_txt'] = 'Wachtwoord sterkte';
$wb['language_txt'] = 'Taal';
$wb['usertheme_txt'] = 'Thema';
......
......@@ -143,7 +143,7 @@ class page_action extends tform_actions {
if (trim($item['client_template_id']) != ''){
if ($text != '') $text .= '';
$text .= '<li rel="' . $item['assigned_template_id'] . '">' . $tpl[$item['client_template_id']];
$text .= '<a href="#" class="button icons16 icoDelete"></a>';
$text .= '&nbsp;<a href="#" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></a>';
$tmp = new stdClass();
$tmp->id = $item['assigned_template_id'];
$tmp->data = '';
......@@ -167,7 +167,7 @@ class page_action extends tform_actions {
foreach($tplAdd as $item){
if (trim($item) != ''){
if ($text != '') $text .= '';
$text .= '<li>' . $tpl[$item]. '<a href="#" class="button icons16 icoDelete"></a></li>';
$text .= '<li>' . $tpl[$item]. '&nbsp;<a href="#" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></a></li>';
}
}
}
......
......@@ -31,7 +31,7 @@
<label for="password" class="col-sm-3 control-label">{tmpl_var name='password_txt'}</label>
<div class="col-sm-9">
<div class="input-group">
<input type="password" name="password" id="password" value="{tmpl_var name='password'}" class="form-control" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" />
<input type="password" name="password" id="password" value="{tmpl_var name='password'}" title="{tmpl_var name='password_click_to_set_txt'}" class="form-control" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" />
<span class="input-group-btn">
<button class="btn btn-default" type="button" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</button>
</span>
......@@ -47,7 +47,7 @@
</div>
<div class="form-group">
<label for="repeat_password" class="col-sm-3 control-label">{tmpl_var name='repeat_password_txt'}</label>
<div class="col-sm-9"><input type="password" name="repeat_password" id="repeat_password" value="" class="form-control" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /></div></div>
<div class="col-sm-9"><input type="password" name="repeat_password" id="repeat_password" value="" title="{tmpl_var name='password_click_to_set_txt'}" class="form-control" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /></div></div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div>
......@@ -158,5 +158,5 @@
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="client/client_edit.php">{tmpl_var name='btn_save_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="client/client_list.php">{tmpl_var name='btn_cancel_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="{tmpl_var name='session_module'}/client_list.php">{tmpl_var name='btn_cancel_txt'}</button>
</div></div>
......@@ -450,7 +450,7 @@
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="client/client_edit.php">{tmpl_var name='btn_save_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="client/client_list.php">{tmpl_var name='btn_cancel_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="{tmpl_var name='session_module'}/client_list.php">{tmpl_var name='btn_cancel_txt'}</button>
</div></div>
</div>
......
......@@ -31,7 +31,7 @@
<label for="password" class="col-sm-3 control-label">{tmpl_var name='password_txt'}</label>
<div class="col-sm-9">
<div class="input-group">
<input type="password" name="password" id="password" value="{tmpl_var name='password'}" class="form-control" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" />
<input type="password" name="password" id="password" value="{tmpl_var name='password'}" title="{tmpl_var name='password_click_to_set_txt'}" class="form-control" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" />
<span class="input-group-btn">
<button class="btn btn-default" type="button" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</button>
</span>
......@@ -47,7 +47,7 @@
</div>
<div class="form-group">
<label for="repeat_password" class="col-sm-3 control-label">{tmpl_var name='repeat_password_txt'}</label>
<div class="col-sm-9"><input type="password" name="repeat_password" id="repeat_password" value="" class="form-control" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /></div></div>
<div class="col-sm-9"><input type="password" name="repeat_password" id="repeat_password" value="" title="{tmpl_var name='password_click_to_set_txt'}" class="form-control" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /></div></div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div>
......
......@@ -39,5 +39,5 @@ $wb['expire_range_error'] = 'Min. Expire time is 60 seconds.';
$wb['minimum_range_error'] = 'Min. Minimum time is 60 seconds.';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['error_not_allowed_server_id'] = 'The selected server is not allowed for this account.';
$wb['soa_cannot_be_changed_txt'] = 'Die Zone (SOA) kann nicht verändert werden. Bitte kontaktieren Sie ihren Administrator, um die Zone zu ändern.';
$wb['soa_cannot_be_changed_txt'] = 'The Zone (SOA) can not be changed. Please contact your administrator to change the zone.';
?>
......@@ -159,6 +159,9 @@ if(count($_POST) > 0) {
$saved_password = stripslashes($mailuser['password']);
//* Check if mailuser password is correct
if(crypt(stripslashes($password), $saved_password) == $saved_password) {
//* Get the sys_user language of the client of the mailuser
$sys_user_lang = $app->db->queryOneRecord("SELECT language FROM sys_user WHERE default_group = ?", $mailuser['sys_groupid'] );
//* we build a fake user here which has access to the mailuser module only and userid 0
$user = array();
$user['userid'] = 0;
......@@ -168,7 +171,11 @@ if(count($_POST) > 0) {
$user['typ'] = 'user';
$user['email'] = $mailuser['email'];
$user['username'] = $username;
$user['language'] = $conf['language'];
if(is_array($sys_user_lang) && $sys_user_lang['language'] != '') {
$user['language'] = $sys_user_lang['language'];
} else {
$user['language'] = $conf['language'];
}
$user['theme'] = $conf['theme'];
$user['app_theme'] = $conf['theme'];
$user['mailuser_id'] = $mailuser['mailuser_id'];
......@@ -209,8 +216,15 @@ if(count($_POST) > 0) {
$user = $app->db->toLower($user);
if ($loginAs) $oldSession = $_SESSION['s'];
// Session regenerate causes login problems on some systems, have to find a better way. see Issue #3827
//if (!$loginAs) session_regenerate_id(true);
// Session regenerate causes login problems on some systems, see Issue #3827
// Set session_regenerate_id to no in security settings, it you encounter
// this problem.
$app->uses('getconf');
$security_config = $app->getconf->get_security_config('permissions');
if(isset($security_config['session_regenerate_id']) && $security_config['session_regenerate_id'] == 'yes') {
if (!$loginAs) session_regenerate_id(true);
}
$_SESSION = array();
if ($loginAs) $_SESSION['s_old'] = $oldSession; // keep the way back!
$_SESSION['s']['user'] = $user;
......
......@@ -88,8 +88,7 @@ $form["tabs"]['domain'] = array (
'errmsg'=> 'domain_error_empty'),
1 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'domain_error_unique'),
2 => array ( 'type' => 'REGEX',
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{2,30}$/',
2 => array ( 'type' => 'ISDOMAIN',
'errmsg'=> 'domain_error_regex'),
),
'default' => '',
......
......@@ -128,7 +128,7 @@ $form["tabs"]['mailuser'] = array(
'errmsg' => 'weak_password_txt'
)
),
'encryption'=> 'CRYPT',
'encryption'=> 'CRYPTMAIL',
'default' => '',
'value' => '',
'width' => '30',
......
......@@ -21,6 +21,7 @@ $wb["quota_error_isint"] = 'Mailbox size must be a number.';
$wb["quota_txt"] = 'Quota (0 for unlimited)';
$wb["server_id_txt"] = 'Aerver_id';
$wb["password_txt"] = 'Password';
$wb['password_click_to_set_txt'] = 'Click to set';
$wb["maildir_txt"] = 'Maildir';
$wb["postfix_txt"] = 'Enable receiving';
$wb['greylisting_txt'] = 'Enable greylisting';
......
......@@ -61,4 +61,5 @@ $wb['daily_backup_txt'] = 'Daily';
$wb['weekly_backup_txt'] = 'Weekly';
$wb['monthly_backup_txt'] = 'Monthly';
$wb['sender_cc_note_txt'] = '(Separate multiple email addresses with commas)';
$wb['password_click_to_set_txt'] = 'Click to set';
?>
......@@ -17,6 +17,7 @@ $wb['quota_error_isint'] = 'Mailbox size must be a number.';
$wb['quota_txt'] = 'Kvota';
$wb['server_id_txt'] = 'Aerver_id';
$wb['password_txt'] = 'Šifra';
$wb['password_click_to_set_txt'] = 'Click to set';
$wb['maildir_txt'] = 'Maildir';
$wb['postfix_txt'] = 'Enable Receiving';
$wb['greylisting_txt'] = 'Enable greylisting';
......
......@@ -13,6 +13,7 @@ $wb['quota_error_isint'] = 'Mailbox méret mező csak szákot tartalmazhat';
$wb['quota_txt'] = 'Korlát MB-ban kifejezve';
$wb['server_id_txt'] = 'szerver_azonosító';
$wb['password_txt'] = 'Jelszó';
$wb['password_click_to_set_txt'] = 'Click to set';
$wb['maildir_txt'] = 'levelezőláda';
$wb['postfix_txt'] = 'Bejövő engedélyezés';
$wb['greylisting_txt'] = 'Enable greylisting';
......
......@@ -18,6 +18,7 @@ $wb['quota_error_isint'] = 'Ukuran Mailbox harus berupa angka.';
$wb['quota_txt'] = 'Kuota';
$wb['server_id_txt'] = 'id_server';
$wb['password_txt'] = 'Kata Sandi';
$wb['password_click_to_set_txt'] = 'Click to set';
$wb['maildir_txt'] = 'Maildir';
$wb['postfix_txt'] = 'Dapat Menerima';
$wb['greylisting_txt'] = 'Enable greylisting';
......
......@@ -14,6 +14,7 @@ $wb['quota_error_isint'] = 'Il valore per la dimensione della casella di posta d
$wb['quota_txt'] = 'quota in MB';
$wb['server_id_txt'] = 'server_id';
$wb['password_txt'] = 'password';
$wb['password_click_to_set_txt'] = 'Click to set';
$wb['maildir_txt'] = 'maildir';
$wb['postfix_txt'] = 'Abilita ricezione';
$wb['access_txt'] = 'Abilita indirizzo';
......
......@@ -14,6 +14,7 @@ $wb['quota_error_isint'] = 'メールボックスの最大数は数字で指定
$wb['quota_txt'] = 'メールボックスの容量';
$wb['server_id_txt'] = 'Aerver_id';
$wb['password_txt'] = 'パスワード';
$wb['password_click_to_set_txt'] = 'Click to set';
$wb['maildir_txt'] = 'メールディレクトリ';
$wb['postfix_txt'] = 'メールを受信する';
$wb['greylisting_txt'] = 'Enable greylisting';
......
......@@ -18,6 +18,7 @@ $wb['quota_error_isint'] = 'Mailbox grootte moet een numerieke waarde zijn.';
$wb['quota_txt'] = 'Quota';
$wb['server_id_txt'] = 'Server_id';
$wb['password_txt'] = 'Wachtwoord';
$wb['password_click_to_set_txt'] = 'Klik om in te stellen';
$wb['maildir_txt'] = 'Maildir';
$wb['postfix_txt'] = 'Ontvangen inschakelen';
$wb['greylisting_txt'] = 'Greylisting inschakelen';
......@@ -35,7 +36,7 @@ $wb['name_txt'] = 'Echte naam';
$wb['name_optional_txt'] = '(Optioneel)';
$wb['autoresponder_active'] = 'Inschakelen autoresponder';
$wb['cc_txt'] = 'Stuur kopie naar';
$wb['cc_error_isemail'] = 'Het "Stuur kopie naar" veld bevat geen geldig e-mail adres';
$wb['cc_error_isemail'] = 'Het \"Stuur kopie naar\" veld bevat geen geldig e-mail adres';
$wb['domain_txt'] = 'Domain';
$wb['now_txt'] = 'Now';
$wb['login_error_unique'] = 'Login is already taken.';
......@@ -59,6 +60,6 @@ $wb['cc_note_txt'] = '(Meerdere e-mail adressen scheiden met een komma)';
$wb['disablesmtp_txt'] = 'Uitschakelen SMTP (versturen)';
$wb['autoresponder_start_date_is_required'] = 'Start date must be set when Autoresponder is enabled.';
$wb['sender_cc_txt'] = 'Stuur uitgaande kopie aan';
$wb['sender_cc_error_isemail'] = 'Het "Stuur uitgaande kopie aan" veld bevat geen geldig e-mail adres';
$wb['sender_cc_error_isemail'] = 'Het \"Stuur uitgaande kopie aan\" veld bevat geen geldig e-mail adres';
$wb['sender_cc_note_txt'] = '(Meerdere e-mail adressen scheiden met een komma)';
?>
......@@ -14,6 +14,7 @@ $wb['quota_error_isint'] = 'Wielkość skrzynki pocztowej musi być liczbą.';
$wb['quota_txt'] = 'Limit';
$wb['server_id_txt'] = 'Serwer_id';
$wb['password_txt'] = 'Hasło';
$wb['password_click_to_set_txt'] = 'Click to set';
$wb['maildir_txt'] = 'Maildir';
$wb['postfix_txt'] = 'Zezwól na odbiór poczty';
$wb['greylisting_txt'] = 'Enable greylisting';
......
......@@ -14,6 +14,7 @@ $wb['quota_error_isint'] = 'O tamanho da caixa de correio deve ser um número.';
$wb['quota_txt'] = 'Cota';
$wb['server_id_txt'] = 'Aerver_id';
$wb['password_txt'] = 'Senha';
$wb