Skip to content

Commit 8ecf432

Browse files
committed
Propperly unset output
1 parent c6cb9ee commit 8ecf432

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/api/index.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function api_legacy(array $request_data) {
8181
exit;
8282
}
8383
$v_ip = quoteshellarg(get_real_user_ip());
84-
$output = '';
84+
unset($output);
8585
exec(HESTIA_CMD."v-get-user-salt admin ".$v_ip." json", $output, $return_var);
8686
$pam = json_decode(implode('', $output), true);
8787
$salt = $pam['admin']['SALT'];
@@ -99,6 +99,7 @@ function api_legacy(array $request_data) {
9999
$fp = fopen($v_password, "w");
100100
fwrite($fp, $password."\n");
101101
fclose($fp);
102+
unset($output);
102103
exec(HESTIA_CMD . 'v-check-user-password "admin" '. $password. ' '.$v_ip.' yes', $output, $return_var);
103104
$hash = $output[0];
104105
unset($output);

0 commit comments

Comments
 (0)