password transmission via tmp files

This commit is contained in:
Serghey Rodin 2015-03-31 00:01:44 +03:00
commit 1a7612cc66
14 changed files with 172 additions and 87 deletions

View file

@ -64,11 +64,15 @@ if (!empty($_POST['save'])) {
// Change database password
if (($v_password != $_POST['v_password']) && (empty($_SESSION['error_msg']))) {
$v_password = escapeshellarg($_POST['v_password']);
$v_password = tempnam("/tmp","vst");
$fp = fopen($v_password, "w");
fwrite($fp, $_POST['v_password']."\n");
fclose($fp);
exec (VESTA_CMD."v-change-database-password ".$v_username." ".$v_database." ".$v_password, $output, $return_var);
check_return_code($return_var,$output);
$v_password = "••••••••";
check_return_code($return_var,$output);
unset($output);
unlink($v_password);
$v_password = "••••••••";
}
// Set success message