Fixed to catch the error output of the key check.
This commit is contained in:
parent
75777daf4b
commit
b9d8eeea9e
@ -213,7 +213,7 @@ class IDF_Form_UserAccount extends Pluf_Form
|
|||||||
$tmpfile = Pluf::f('tmp_folder', '/tmp').$user.'-key';
|
$tmpfile = Pluf::f('tmp_folder', '/tmp').$user.'-key';
|
||||||
file_put_contents($tmpfile, $key, LOCK_EX);
|
file_put_contents($tmpfile, $key, LOCK_EX);
|
||||||
$cmd = Pluf::f('idf_exec_cmd_prefix', '').
|
$cmd = Pluf::f('idf_exec_cmd_prefix', '').
|
||||||
'ssh-keygen -l -f '.escapeshellarg($tmpfile);
|
'ssh-keygen -l -f '.escapeshellarg($tmpfile).' > /dev/null 2>&1';
|
||||||
exec($cmd, $out, $return);
|
exec($cmd, $out, $return);
|
||||||
unlink($tmpfile);
|
unlink($tmpfile);
|
||||||
if ($return != 0) {
|
if ($return != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user