Skip to content

Commit d2212dd

Browse files
committed
1 parent 6fc833c commit d2212dd

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

server/lib/classes/system.inc.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,13 +1187,13 @@ function maildirmake($maildir_path, $user = '', $subfolder = '') {
11871187
global $app;
11881188

11891189
if($subfolder != '') {
1190-
$dir = escapeshellarg($maildir_path.'/.'.$subfolder);
1190+
$dir = escapeshellcmd($maildir_path.'/.'.$subfolder);
11911191
} else {
1192-
$dir = escapeshellarg($maildir_path);
1192+
$dir = escapeshellcmd($maildir_path);
11931193
}
11941194

11951195
if($user != '' && $user != 'root' && $this->is_user($user)) {
1196-
$user = escapeshellarg($user);
1196+
$user = escapeshellcmd($user);
11971197
// I assume that the name of the (vmail group) is the same as the name of the mail user in ISPConfig 3
11981198
$group = $user;
11991199
chown($dir,$user);
@@ -1214,18 +1214,20 @@ function maildirmake($maildir_path, $user = '', $subfolder = '') {
12141214

12151215
chmod($dir, 0700);
12161216

1217+
/*
12171218
if($user != '' && $this->is_user($user) && $user != 'root') {
1218-
$user = escapeshellarg($user);
1219+
$user = escapeshellcmd($user);
12191220
// I assume that the name of the (vmail group) is the same as the name of the mail user in ISPConfig 3
12201221
$group = $user;
12211222
exec("chown $user:$group $dir $dir_cur $dir_new $dir_tmp");
12221223
}
1224+
*/
12231225

12241226
//* Add the subfolder to the subscriptions and courierimapsubscribed files
12251227
if($subfolder != '') {
12261228
// Courier
12271229
if(!is_file($maildir_path.'/courierimapsubscribed')) {
1228-
$tmp_file = escapeshellarg($maildir_path.'/courierimapsubscribed');
1230+
$tmp_file = escapeshellcmd($maildir_path.'/courierimapsubscribed');
12291231
touch($tmp_file);
12301232
chmod($tmp_file, 0744);
12311233
chown($tmp_file,'vmail');
@@ -1235,7 +1237,7 @@ function maildirmake($maildir_path, $user = '', $subfolder = '') {
12351237

12361238
// Dovecot
12371239
if(!is_file($maildir_path.'/subscriptions')) {
1238-
$tmp_file = escapeshellarg($maildir_path.'/subscriptions');
1240+
$tmp_file = escapeshellcmd($maildir_path.'/subscriptions');
12391241
touch($tmp_file);
12401242
chmod($tmp_file, 0744);
12411243
chown($tmp_file,'vmail');

0 commit comments

Comments
 (0)