Skip to content

Commit 03bca94

Browse files
committed
Merged revisions 2173-2174 from stable branch.
1 parent 04620b7 commit 03bca94

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

interface/lib/classes/remoting_lib.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,11 +661,11 @@ function getDataRecord($primary_id) {
661661
}
662662

663663
function ispconfig_sysuser_add($params,$insert_id){
664-
global $app,$sql1;
664+
global $conf,$app,$sql1;
665665
$username = $app->db->quote($params["username"]);
666666
$password = $app->db->quote($params["password"]);
667667
if(!isset($params['modules'])) {
668-
$modules = 'dashboard,mail,sites,dns,tools';
668+
$modules = $conf['interface_modules_enabled'];
669669
} else {
670670
$modules = $app->db->quote($params['modules']);
671671
}

interface/lib/classes/validate_ftpuser.inc.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ function ftp_dir($field_name, $field_value, $validator) {
7272

7373
$doc_root .= "/";
7474
if(substr($field_value, 0, strlen($doc_root)) == $doc_root) $is_ok = true;
75+
76+
if(stristr($field_value,'..') or stristr($field_value,'./') or stristr($field_value,'/.')) $is_ok = false;
7577

7678
if($is_ok == false) {
7779
$errmsg = $validator['errmsg'];

interface/web/sites/form/ftp_user.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
)
127127
);
128128

129-
if($_SESSION["s"]["user"]["typ"] == 'admin') {
129+
if($app->auth->is_admin()) {
130130

131131
$form["tabs"]['advanced'] = array (
132132
'title' => "Options",

0 commit comments

Comments
 (0)