mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 18:49:17 -07:00
security fix. user verification improvement
This commit is contained in:
parent
8e42997f3c
commit
9f93912546
1 changed files with 1 additions and 4 deletions
|
@ -156,13 +156,12 @@ if ($_SESSION['user'] == 'admin') {
|
|||
}
|
||||
|
||||
// Check user
|
||||
$v_username = escapeshellarg($_GET['user']);
|
||||
$v_username = $user;
|
||||
exec (VESTA_CMD."v-list-user ".$v_username." json", $output, $return_var);
|
||||
check_return_code($return_var,$output);
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
unset($output);
|
||||
$v_username = $_GET['user'];
|
||||
$v_password = "••••••••";
|
||||
$v_email = $data[$v_username]['CONTACT'];
|
||||
$v_fname = $data[$v_username]['FNAME'];
|
||||
|
@ -191,8 +190,6 @@ if ($_SESSION['user'] == 'admin') {
|
|||
|
||||
// Action
|
||||
if (!empty($_POST['save'])) {
|
||||
$v_username = escapeshellarg($_POST['v_username']);
|
||||
|
||||
// Change password
|
||||
if (($v_password != $_POST['v_password']) && (empty($_SESSION['error_msg']))) {
|
||||
$v_password = escapeshellarg($_POST['v_password']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue