Skip to content

Commit 857b257

Browse files
authored
Fix php error where $username gets overwritten (hestiacp#3884)
1 parent 80b38fb commit 857b257

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/inc/main.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,10 @@ function destroy_sessions() {
101101
$_SESSION["token"] = $token;
102102
}
103103
$username = $_SESSION["user"];
104-
if (isset($_SESSION["look"])) {
104+
if ($_SESSION["look"] != "") {
105105
$username = $_SESSION["look"];
106106
}
107+
107108
exec(HESTIA_CMD . "v-list-user " . quoteshellarg($username) . " json", $output, $return_var);
108109
$data = json_decode(implode("", $output), true);
109110
unset($output, $return_var);

0 commit comments

Comments
 (0)