Skip to content

Commit 9f93912

Browse files
committed
security fix. user verification improvement
1 parent 8e42997 commit 9f93912

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

web/edit/user/index.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,12 @@
156156
}
157157

158158
// Check user
159-
$v_username = escapeshellarg($_GET['user']);
159+
$v_username = $user;
160160
exec (VESTA_CMD."v-list-user ".$v_username." json", $output, $return_var);
161161
check_return_code($return_var,$output);
162162
if (empty($_SESSION['error_msg'])) {
163163
$data = json_decode(implode('', $output), true);
164164
unset($output);
165-
$v_username = $_GET['user'];
166165
$v_password = "••••••••";
167166
$v_email = $data[$v_username]['CONTACT'];
168167
$v_fname = $data[$v_username]['FNAME'];
@@ -191,8 +190,6 @@
191190

192191
// Action
193192
if (!empty($_POST['save'])) {
194-
$v_username = escapeshellarg($_POST['v_username']);
195-
196193
// Change password
197194
if (($v_password != $_POST['v_password']) && (empty($_SESSION['error_msg']))) {
198195
$v_password = escapeshellarg($_POST['v_password']);

0 commit comments

Comments
 (0)