Commit 04620b7f authored by tbrehm's avatar tbrehm
Browse files

Merged these revisions from trunk: 2153-2164,2166,2168,2171

parent aec1333f
......@@ -264,7 +264,11 @@ update-rc.d mydns defaults
6) Install vlogger and webalizer
apt-get -y install vlogger webalizer
apt-get -y install vlogger webalizer awstats
mkdir /usr/share/awstats/tools
cp -prf /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/share/awstats/tools/awstats_buildstaticpages.pl
7) Install Jailkit (optional, only needed if you want to use chrooting for SSH users)
......
......@@ -954,8 +954,8 @@ CREATE TABLE `sys_datalog` (
`action` char(1) NOT NULL default '',
`tstamp` int(11) NOT NULL default '0',
`user` varchar(255) NOT NULL default '',
`data` longtext NOT NULL,
`status` set('pending','ok','warning','error') NOT NULL default 'pending',
`data` longtext NOT NULL,
`status` set('pending','ok','warning','error') NOT NULL default 'ok',
PRIMARY KEY (`datalog_id`),
KEY `server_id` (`server_id`,`status`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
......
......@@ -56,7 +56,7 @@ $revision = str_replace(array('Revision:','$',' '), '', $svn_revision);
//** Application
define('ISPC_APP_TITLE', 'ISPConfig');
define('ISPC_APP_VERSION', '3.0.3.1');
define('ISPC_APP_VERSION', '3.0.3.2');
//** Database
......
......@@ -148,7 +148,8 @@ class plugin {
$app->loaded_plugins[$plugin_name] = new $plugin_name;
}
if($this->debug) $app->log("Called method: '$function_name' in plugin '$plugin_name' for event '$event_name'",LOGLEVEL_DEBUG);
call_user_method($function_name,$app->loaded_plugins[$plugin_name],$event_name,$data);
// call_user_method($function_name,$app->loaded_plugins[$plugin_name],$event_name,$data);
call_user_func(array($app->loaded_plugins[$plugin_name],$function_name),$event_name,$data);
}
}
......
......@@ -192,53 +192,53 @@ class remoting {
return $affected_rows;
}
//* Get mail mailinglist details
public function mail_mailinglist_get($session_id, $primary_id)
{
global $app;
if(!$this->checkPerm($session_id, 'mail_mailinglist_get')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$app->uses('remoting_lib');
$app->remoting_lib->loadFormDef('../mail/form/mail_mailinglist.tform.php');
return $app->remoting_lib->getDataRecord($primary_id);
}
//* Add a mail mailinglist
public function mail_mailinglist_add($session_id, $client_id, $params)
{
if(!$this->checkPerm($session_id, 'mail_mailinglist_add')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$primary_id = $this->insertQuery('../mail/form/mail_mailinglist.tform.php',$client_id,$params);
return $primary_id;
}
//* Update a mail mailinglist
public function mail_mailinglist_update($session_id, $client_id, $primary_id, $params)
{
if(!$this->checkPerm($session_id, 'mail_mailinglist_update')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$affected_rows = $this->updateQuery('../mail/form/mail_mailinglist.tform.php', $client_id, $primary_id, $params);
return $affected_rows;
}
//* Delete a mail mailinglist
public function mail_mailinglist_delete($session_id, $primary_id)
{
if(!$this->checkPerm($session_id, 'mail_mailinglist_delete')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$affected_rows = $this->deleteQuery('../mail/form/mail_mailinglist.tform.php', $primary_id);
return $affected_rows;
}
//* Get mail mailinglist details
public function mail_mailinglist_get($session_id, $primary_id)
{
global $app;
if(!$this->checkPerm($session_id, 'mail_mailinglist_get')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$app->uses('remoting_lib');
$app->remoting_lib->loadFormDef('../mail/form/mail_mailinglist.tform.php');
return $app->remoting_lib->getDataRecord($primary_id);
}
//* Add a mail mailinglist
public function mail_mailinglist_add($session_id, $client_id, $params)
{
if(!$this->checkPerm($session_id, 'mail_mailinglist_add')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$primary_id = $this->insertQuery('../mail/form/mail_mailinglist.tform.php',$client_id,$params);
return $primary_id;
}
//* Update a mail mailinglist
public function mail_mailinglist_update($session_id, $client_id, $primary_id, $params)
{
if(!$this->checkPerm($session_id, 'mail_mailinglist_update')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$affected_rows = $this->updateQuery('../mail/form/mail_mailinglist.tform.php', $client_id, $primary_id, $params);
return $affected_rows;
}
//* Delete a mail mailinglist
public function mail_mailinglist_delete($session_id, $primary_id)
{
if(!$this->checkPerm($session_id, 'mail_mailinglist_delete')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$affected_rows = $this->deleteQuery('../mail/form/mail_mailinglist.tform.php', $primary_id);
return $affected_rows;
}
//* Get mail user details
public function mail_user_get($session_id, $primary_id)
{
......@@ -1005,7 +1005,7 @@ class remoting {
$this->server->fault('permission_denied','You do not have the permissions to access this function.');
return false;
}
$affected_rows = $this->updateQuery('../client/form/client.tform.php', $client_id, $reseller_id, $params);
$affected_rows = $this->updateQuery('../client/form/client.tform.php', $reseller_id, $client_id, $params);
$app->remoting_lib->ispconfig_sysuser_update($params,$client_id);
......
......@@ -737,7 +737,7 @@ class tform {
}
break;
case 'ISEMAIL':
if(!preg_match("/^\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z\-]{2,10}$/i", $field_value)) {
if(!preg_match("/^\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-zA-Z0-9\-]{2,30}$/i", $field_value)) {
$errmsg = $validator['errmsg'];
if(isset($this->wordbook[$errmsg])) {
$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
......@@ -860,14 +860,14 @@ class tform {
}
$salt.="$";
// $salt = substr(md5(time()),0,2);
$record[$key] = crypt($record[$key],$salt);
$record[$key] = crypt(stripslashes($record[$key]),$salt);
$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
} elseif ($field['encryption'] == 'MYSQL') {
$sql_insert_val .= "PASSWORD('".$app->db->quote($record[$key])."'), ";
} elseif ($field['encryption'] == 'CLEARTEXT') {
$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
} else {
$record[$key] = md5($record[$key]);
$record[$key] = md5(stripslashes($record[$key]));
$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
}
......@@ -895,14 +895,14 @@ class tform {
}
$salt.="$";
// $salt = substr(md5(time()),0,2);
$record[$key] = crypt($record[$key],$salt);
$record[$key] = crypt(stripslashes($record[$key]),$salt);
$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
} elseif (isset($field['encryption']) && $field['encryption'] == 'MYSQL') {
$sql_update .= "`$key` = PASSWORD('".$app->db->quote($record[$key])."'), ";
} elseif (isset($field['encryption']) && $field['encryption'] == 'CLEARTEXT') {
$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
} else {
$record[$key] = md5($record[$key]);
$record[$key] = md5(stripslashes($record[$key]));
$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
}
......
......@@ -138,10 +138,10 @@ if($_POST['create'] == 1) {
if(isset($_POST['ns2']) && $_POST['ns2'] == '') $error .= $app->lng('error_ns2_empty').'<br />';
if(isset($_POST['email']) && $_POST['email'] == '') $error .= $app->lng('error_email_empty').'<br />';
if(isset($_POST['domain']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z\-]{2,10}[\.]{0,1}$/',$_POST['domain'])) $error .= $app->lng('error_domain_regex').'<br />';
if(isset($_POST['ns1']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z]{2,10}[\.]{0,1}$/',$_POST['ns1'])) $error .= $app->lng('error_ns1_regex').'<br />';
if(isset($_POST['ns2']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z]{2,10}[\.]{0,1}$/',$_POST['ns2'])) $error .= $app->lng('error_ns2_regex').'<br />';
if(isset($_POST['email']) && !preg_match('/^\w+[\w.-]*\w+@\w+[\w.-]*\w+\.[a-z\-]{2,10}$/i',$_POST['email'])) $error .= $app->lng('error_email_regex').'<br />';
if(isset($_POST['domain']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z0-9\-]{2,30}[\.]{0,1}$/',$_POST['domain'])) $error .= $app->lng('error_domain_regex').'<br />';
if(isset($_POST['ns1']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z0-9]{2,30}[\.]{0,1}$/',$_POST['ns1'])) $error .= $app->lng('error_ns1_regex').'<br />';
if(isset($_POST['ns2']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z0-9]{2,30}[\.]{0,1}$/',$_POST['ns2'])) $error .= $app->lng('error_ns2_regex').'<br />';
if(isset($_POST['email']) && !preg_match('/^\w+[\w.-]*\w+@\w+[\w.-]*\w+\.[a-z0-9\-]{2,30}$/i',$_POST['email'])) $error .= $app->lng('error_email_regex').'<br />';
// make sure that the record belongs to the clinet group and not the admin group when a dmin inserts it
if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($_POST['client_group_id'])) {
......
......@@ -82,7 +82,7 @@ $form["tabs"]['dns_soa'] = array (
1 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'origin_error_unique'),
2 => array ( 'type' => 'REGEX',
'regex' => '/^[\w\.\-\/]{2,255}\.[a-zA-Z\-]{2,10}[\.]{0,1}$/',
'regex' => '/^[\w\.\-\/]{2,255}\.[a-zA-Z0-9\-]{2,30}[\.]{0,1}$/',
'errmsg'=> 'origin_error_regex'),
),
'default' => '',
......
......@@ -74,7 +74,7 @@ $form["tabs"]['alias'] = array (
1 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'source_error_unique'),
2 => array ( 'type' => 'REGEX',
'regex' => '/^\@[\w\.\-]{2,64}\.[a-zA-Z\-]{2,10}$/',
'regex' => '/^\@[\w\.\-]{2,64}\.[a-zA-Z0-9\-]{2,10}$/',
'errmsg'=> 'source_error_regex'),
),
'default' => '',
......
......@@ -77,7 +77,7 @@ $form["tabs"]['domain'] = array (
1 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'domain_error_unique'),
2 => array ( 'type' => 'REGEX',
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z\-]{2,10}$/',
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{2,30}$/',
'errmsg'=> 'domain_error_regex'),
),
'default' => '',
......
......@@ -74,7 +74,7 @@ $form["tabs"]['catchall'] = array (
1 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'domain_error_unique'),
2 => array ( 'type' => 'REGEX',
'regex' => '/^\@[\w\.\-]{2,255}\.[a-zA-Z\-]{2,10}$/',
'regex' => '/^\@[\w\.\-]{2,255}\.[a-zA-Z\-]{2,30}$/',
'errmsg'=> 'domain_error_regex'),
),
'default' => '',
......
......@@ -48,7 +48,7 @@ $form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match wi
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_other"] = 'r'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$form["tabs"]['filter'] = array (
'title' => "Filter",
......
......@@ -266,7 +266,7 @@ class page_action extends tform_actions {
$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = '".mysql_real_escape_string($this->dataRecord["email"])."'");
if($tmp_user["id"] > 0) {
// There is already a record that we will update
$app->db->datalogUpdate('spamfilter_users', "policy_id = $ploicy_id", 'id', $tmp_user["id"]);
$app->db->datalogUpdate('spamfilter_users', "policy_id = $policy_id", 'id', $tmp_user["id"]);
} else {
// We create a new record
$insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `priority`, `policy_id`, `email`, `fullname`, `local`)
......
......@@ -27,7 +27,7 @@
<td class="tbl_col_active"><select name="search_active" onChange="submitForm('pageForm','mail/mail_aliasdomain_list.php');">{tmpl_var name='search_active'}</select></td>
<td class="tbl_col_source"><input type="text" name="search_source" value="{tmpl_var name='search_source'}" /></td>
<td class="tbl_col_destination"><input type="text" name="search_destination" value="{tmpl_var name='search_destination'}" /></td>
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','mail/mail_alias_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','mail/mail_aliasdomain_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
</tr>
</thead>
<tbody>
......
......@@ -127,7 +127,7 @@ $wb['monitor_services_ftp_txt'] = 'FTP-Server:';
$wb['monitor_services_smtp_txt'] = 'SMTP-Server:';
$wb['monitor_services_pop_txt'] = 'POP3-Server:';
$wb['monitor_services_imap_txt'] = 'IMAP-Server:';
$wb['monitor_services_mydns_txt'] = 'myDNS-Server:';
$wb['monitor_services_mydns_txt'] = 'DNS-Server:';
$wb['monitor_services_mysql_txt'] = 'mySQL-Server:';
$wb['monitor_settings_datafromdate_txt'] = 'Data from: ';
$wb['monitor_settings_datetimeformat_txt'] = 'Y-m-d H:i';
......
......@@ -121,7 +121,7 @@ $wb['monitor_services_ftp_txt'] = 'FTP-Server:';
$wb['monitor_services_smtp_txt'] = 'SMTP-Server:';
$wb['monitor_services_pop_txt'] = 'POP3-Server:';
$wb['monitor_services_imap_txt'] = 'IMAP-Server:';
$wb['monitor_services_mydns_txt'] = 'myDNS-Server:';
$wb['monitor_services_mydns_txt'] = 'DNS-Server:';
$wb['monitor_services_mysql_txt'] = 'mySQL-Server:';
$wb['monitor_settings_datafromdate_txt'] = 'Data from: ';
$wb['monitor_settings_datetimeformat_txt'] = 'Y-m-d H:i';
......
......@@ -121,7 +121,7 @@ $wb['monitor_services_ftp_txt'] = 'FTP-Server:';
$wb['monitor_services_smtp_txt'] = 'SMTP-Server:';
$wb['monitor_services_pop_txt'] = 'POP3-Server:';
$wb['monitor_services_imap_txt'] = 'IMAP-Server:';
$wb['monitor_services_mydns_txt'] = 'myDNS-Server:';
$wb['monitor_services_mydns_txt'] = 'DNS-Server:';
$wb['monitor_services_mysql_txt'] = 'mySQL-Server:';
$wb['monitor_settings_datafromdate_txt'] = 'Data z: ';
$wb['monitor_settings_datetimeformat_txt'] = 'Y-d-m H:i';
......
......@@ -121,7 +121,7 @@ $wb['monitor_services_ftp_txt'] = 'FTP-Server:';
$wb['monitor_services_smtp_txt'] = 'SMTP-Server:';
$wb['monitor_services_pop_txt'] = 'POP3-Server:';
$wb['monitor_services_imap_txt'] = 'IMAP-Server:';
$wb['monitor_services_mydns_txt'] = 'myDNS-Server:';
$wb['monitor_services_mydns_txt'] = 'DNS-Server:';
$wb['monitor_services_mysql_txt'] = 'mySQL-Server:';
$wb['monitor_settings_datafromdate_txt'] = 'Daten vom: ';
$wb['monitor_settings_datetimeformat_txt'] = 'd-m-Y H:i';
......
......@@ -127,7 +127,7 @@ $wb['monitor_services_ftp_txt'] = 'FTP-Server:';
$wb['monitor_services_smtp_txt'] = 'SMTP-Server:';
$wb['monitor_services_pop_txt'] = 'POP3-Server:';
$wb['monitor_services_imap_txt'] = 'IMAP-Server:';
$wb['monitor_services_mydns_txt'] = 'myDNS-Server:';
$wb['monitor_services_mydns_txt'] = 'DNS-Server:';
$wb['monitor_services_mysql_txt'] = 'mySQL-Server:';
$wb['monitor_settings_datafromdate_txt'] = 'Data from: ';
$wb['monitor_settings_datetimeformat_txt'] = 'Y-m-d H:i';
......
......@@ -121,7 +121,7 @@ $wb['monitor_services_ftp_txt'] = 'FTP-Server:';
$wb['monitor_services_smtp_txt'] = 'SMTP-Server:';
$wb['monitor_services_pop_txt'] = 'POP3-Server:';
$wb['monitor_services_imap_txt'] = 'IMAP-Server:';
$wb['monitor_services_mydns_txt'] = 'myDNS-Server:';
$wb['monitor_services_mydns_txt'] = 'DNS-Server:';
$wb['monitor_services_mysql_txt'] = 'mySQL-Server:';
$wb['monitor_settings_datafromdate_txt'] = 'Data from: ';
$wb['monitor_settings_datetimeformat_txt'] = 'Y-m-d H:i';
......
Supports Markdown
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