Commit 11210250 authored by Marius Burkard's avatar Marius Burkard

- fixed invalid argument count on exec_safe in shell_user plugin

parent a0fed931
......@@ -129,9 +129,9 @@ class shelluser_base_plugin {
$app->system->chgrp($homedir,$data['new']['pgroup'],false);
}
$command = 'useradd -d ? -g ? -o ?'; // non unique
if($data['new']['password'] != '') $command .= ' -p ?';
if($data['new']['password'] != '') $command .= ' -p ' . escapeshellarg($data['new']['password']);
$command .= ' -s ? -u ? ?';
$app->system->exec_safe($command, $homedir, $data['new']['pgroup'], $data['new']['password'], $data['new']['shell'], $uid, $data['new']['username']);
$app->system->exec_safe($command, $homedir, $data['new']['pgroup'], $data['new']['shell'], $uid, $data['new']['username']);
$app->log("Executed command: ".$command, LOGLEVEL_DEBUG);
$app->log("Added shelluser: ".$data['new']['username'], LOGLEVEL_DEBUG);
......
Markdown is supported
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