Skip to content

Commit 04620b7

Browse files
committed
Merged these revisions from trunk: 2153-2164,2166,2168,2171
1 parent aec1333 commit 04620b7

38 files changed

+118
-96
lines changed

docs/INSTALL_DEBIAN_5.0_courier_mydns.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,11 @@ update-rc.d mydns defaults
264264

265265
6) Install vlogger and webalizer
266266

267-
apt-get -y install vlogger webalizer
267+
apt-get -y install vlogger webalizer awstats
268+
269+
mkdir /usr/share/awstats/tools
270+
cp -prf /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/share/awstats/tools/awstats_buildstaticpages.pl
271+
268272

269273

270274
7) Install Jailkit (optional, only needed if you want to use chrooting for SSH users)

install/sql/ispconfig3.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -954,8 +954,8 @@ CREATE TABLE `sys_datalog` (
954954
`action` char(1) NOT NULL default '',
955955
`tstamp` int(11) NOT NULL default '0',
956956
`user` varchar(255) NOT NULL default '',
957-
`data` longtext NOT NULL,
958-
`status` set('pending','ok','warning','error') NOT NULL default 'pending',
957+
`data` longtext NOT NULL,
958+
`status` set('pending','ok','warning','error') NOT NULL default 'ok',
959959
PRIMARY KEY (`datalog_id`),
960960
KEY `server_id` (`server_id`,`status`)
961961
) ENGINE=MyISAM AUTO_INCREMENT=1;

install/tpl/config.inc.php.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ $revision = str_replace(array('Revision:','$',' '), '', $svn_revision);
5656

5757
//** Application
5858
define('ISPC_APP_TITLE', 'ISPConfig');
59-
define('ISPC_APP_VERSION', '3.0.3.1');
59+
define('ISPC_APP_VERSION', '3.0.3.2');
6060

6161

6262
//** Database

interface/lib/classes/plugin.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ private function callPluginEvent($event_name,$data) {
148148
$app->loaded_plugins[$plugin_name] = new $plugin_name;
149149
}
150150
if($this->debug) $app->log("Called method: '$function_name' in plugin '$plugin_name' for event '$event_name'",LOGLEVEL_DEBUG);
151-
call_user_method($function_name,$app->loaded_plugins[$plugin_name],$event_name,$data);
151+
// call_user_method($function_name,$app->loaded_plugins[$plugin_name],$event_name,$data);
152+
call_user_func(array($app->loaded_plugins[$plugin_name],$function_name),$event_name,$data);
152153
}
153154
}
154155

interface/lib/classes/remoting.inc.php

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -192,53 +192,53 @@ public function mail_domain_delete($session_id, $primary_id)
192192
return $affected_rows;
193193
}
194194

195-
//* Get mail mailinglist details
196-
public function mail_mailinglist_get($session_id, $primary_id)
197-
{
198-
global $app;
199-
200-
if(!$this->checkPerm($session_id, 'mail_mailinglist_get')) {
201-
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
202-
return false;
203-
}
204-
$app->uses('remoting_lib');
205-
$app->remoting_lib->loadFormDef('../mail/form/mail_mailinglist.tform.php');
206-
return $app->remoting_lib->getDataRecord($primary_id);
207-
}
208-
209-
//* Add a mail mailinglist
210-
public function mail_mailinglist_add($session_id, $client_id, $params)
211-
{
212-
if(!$this->checkPerm($session_id, 'mail_mailinglist_add')) {
213-
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
214-
return false;
215-
}
216-
$primary_id = $this->insertQuery('../mail/form/mail_mailinglist.tform.php',$client_id,$params);
217-
return $primary_id;
218-
}
219-
220-
//* Update a mail mailinglist
221-
public function mail_mailinglist_update($session_id, $client_id, $primary_id, $params)
222-
{
223-
if(!$this->checkPerm($session_id, 'mail_mailinglist_update')) {
224-
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
225-
return false;
226-
}
227-
$affected_rows = $this->updateQuery('../mail/form/mail_mailinglist.tform.php', $client_id, $primary_id, $params);
228-
return $affected_rows;
229-
}
230-
231-
//* Delete a mail mailinglist
232-
public function mail_mailinglist_delete($session_id, $primary_id)
233-
{
234-
if(!$this->checkPerm($session_id, 'mail_mailinglist_delete')) {
235-
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
236-
return false;
237-
}
238-
$affected_rows = $this->deleteQuery('../mail/form/mail_mailinglist.tform.php', $primary_id);
239-
return $affected_rows;
240-
}
241-
195+
//* Get mail mailinglist details
196+
public function mail_mailinglist_get($session_id, $primary_id)
197+
{
198+
global $app;
199+
200+
if(!$this->checkPerm($session_id, 'mail_mailinglist_get')) {
201+
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
202+
return false;
203+
}
204+
$app->uses('remoting_lib');
205+
$app->remoting_lib->loadFormDef('../mail/form/mail_mailinglist.tform.php');
206+
return $app->remoting_lib->getDataRecord($primary_id);
207+
}
208+
209+
//* Add a mail mailinglist
210+
public function mail_mailinglist_add($session_id, $client_id, $params)
211+
{
212+
if(!$this->checkPerm($session_id, 'mail_mailinglist_add')) {
213+
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
214+
return false;
215+
}
216+
$primary_id = $this->insertQuery('../mail/form/mail_mailinglist.tform.php',$client_id,$params);
217+
return $primary_id;
218+
}
219+
220+
//* Update a mail mailinglist
221+
public function mail_mailinglist_update($session_id, $client_id, $primary_id, $params)
222+
{
223+
if(!$this->checkPerm($session_id, 'mail_mailinglist_update')) {
224+
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
225+
return false;
226+
}
227+
$affected_rows = $this->updateQuery('../mail/form/mail_mailinglist.tform.php', $client_id, $primary_id, $params);
228+
return $affected_rows;
229+
}
230+
231+
//* Delete a mail mailinglist
232+
public function mail_mailinglist_delete($session_id, $primary_id)
233+
{
234+
if(!$this->checkPerm($session_id, 'mail_mailinglist_delete')) {
235+
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
236+
return false;
237+
}
238+
$affected_rows = $this->deleteQuery('../mail/form/mail_mailinglist.tform.php', $primary_id);
239+
return $affected_rows;
240+
}
241+
242242
//* Get mail user details
243243
public function mail_user_get($session_id, $primary_id)
244244
{
@@ -1005,7 +1005,7 @@ public function client_update($session_id, $client_id, $reseller_id, $params)
10051005
$this->server->fault('permission_denied','You do not have the permissions to access this function.');
10061006
return false;
10071007
}
1008-
$affected_rows = $this->updateQuery('../client/form/client.tform.php', $client_id, $reseller_id, $params);
1008+
$affected_rows = $this->updateQuery('../client/form/client.tform.php', $reseller_id, $client_id, $params);
10091009

10101010
$app->remoting_lib->ispconfig_sysuser_update($params,$client_id);
10111011

interface/lib/classes/tform.inc.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ function validateField($field_name, $field_value, $validators) {
737737
}
738738
break;
739739
case 'ISEMAIL':
740-
if(!preg_match("/^\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z\-]{2,10}$/i", $field_value)) {
740+
if(!preg_match("/^\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-zA-Z0-9\-]{2,30}$/i", $field_value)) {
741741
$errmsg = $validator['errmsg'];
742742
if(isset($this->wordbook[$errmsg])) {
743743
$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
@@ -860,14 +860,14 @@ function getSQL($record, $tab, $action = 'INSERT', $primary_id = 0, $sql_ext_whe
860860
}
861861
$salt.="$";
862862
// $salt = substr(md5(time()),0,2);
863-
$record[$key] = crypt($record[$key],$salt);
863+
$record[$key] = crypt(stripslashes($record[$key]),$salt);
864864
$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
865865
} elseif ($field['encryption'] == 'MYSQL') {
866866
$sql_insert_val .= "PASSWORD('".$app->db->quote($record[$key])."'), ";
867867
} elseif ($field['encryption'] == 'CLEARTEXT') {
868868
$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
869869
} else {
870-
$record[$key] = md5($record[$key]);
870+
$record[$key] = md5(stripslashes($record[$key]));
871871
$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
872872
}
873873

@@ -895,14 +895,14 @@ function getSQL($record, $tab, $action = 'INSERT', $primary_id = 0, $sql_ext_whe
895895
}
896896
$salt.="$";
897897
// $salt = substr(md5(time()),0,2);
898-
$record[$key] = crypt($record[$key],$salt);
898+
$record[$key] = crypt(stripslashes($record[$key]),$salt);
899899
$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
900900
} elseif (isset($field['encryption']) && $field['encryption'] == 'MYSQL') {
901901
$sql_update .= "`$key` = PASSWORD('".$app->db->quote($record[$key])."'), ";
902902
} elseif (isset($field['encryption']) && $field['encryption'] == 'CLEARTEXT') {
903903
$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
904904
} else {
905-
$record[$key] = md5($record[$key]);
905+
$record[$key] = md5(stripslashes($record[$key]));
906906
$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
907907
}
908908

interface/web/dns/dns_wizard.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@
138138
if(isset($_POST['ns2']) && $_POST['ns2'] == '') $error .= $app->lng('error_ns2_empty').'<br />';
139139
if(isset($_POST['email']) && $_POST['email'] == '') $error .= $app->lng('error_email_empty').'<br />';
140140

141-
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 />';
142-
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 />';
143-
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 />';
144-
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 />';
141+
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 />';
142+
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 />';
143+
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 />';
144+
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 />';
145145

146146
// make sure that the record belongs to the clinet group and not the admin group when a dmin inserts it
147147
if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($_POST['client_group_id'])) {

interface/web/dns/form/dns_soa.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
1 => array ( 'type' => 'UNIQUE',
8383
'errmsg'=> 'origin_error_unique'),
8484
2 => array ( 'type' => 'REGEX',
85-
'regex' => '/^[\w\.\-\/]{2,255}\.[a-zA-Z\-]{2,10}[\.]{0,1}$/',
85+
'regex' => '/^[\w\.\-\/]{2,255}\.[a-zA-Z0-9\-]{2,30}[\.]{0,1}$/',
8686
'errmsg'=> 'origin_error_regex'),
8787
),
8888
'default' => '',

interface/web/mail/form/mail_aliasdomain.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
1 => array ( 'type' => 'UNIQUE',
7575
'errmsg'=> 'source_error_unique'),
7676
2 => array ( 'type' => 'REGEX',
77-
'regex' => '/^\@[\w\.\-]{2,64}\.[a-zA-Z\-]{2,10}$/',
77+
'regex' => '/^\@[\w\.\-]{2,64}\.[a-zA-Z0-9\-]{2,10}$/',
7878
'errmsg'=> 'source_error_regex'),
7979
),
8080
'default' => '',

interface/web/mail/form/mail_domain.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
1 => array ( 'type' => 'UNIQUE',
7878
'errmsg'=> 'domain_error_unique'),
7979
2 => array ( 'type' => 'REGEX',
80-
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z\-]{2,10}$/',
80+
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{2,30}$/',
8181
'errmsg'=> 'domain_error_regex'),
8282
),
8383
'default' => '',

0 commit comments

Comments
 (0)