Skip to content

Commit 96b02de

Browse files
authored
Update index.php
1 parent 808770f commit 96b02de

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

web/reset/index.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@
2020
$data = json_decode(implode('', $output), true);
2121
if($email == $data[$user]['CONTACT']){
2222
//genrate new rkey
23-
$rkey = substr( password_hash( 'hestiacp', PASSWORD_DEFAULT ), 5, 12 );
23+
$rkey = substr( password_hash( rand(0,10000), PASSWORD_DEFAULT ), 5, 12 );
2424
$hash = password_hash($rkey, PASSWORD_DEFAULT);
2525
$v_rkey = tempnam("/tmp","vst");
2626
$fp = fopen($v_rkey, "w");
2727
fwrite($fp, $hash."\n");
2828
fclose($fp);
29-
exec ("/usr/bin/sudo /usr/local/hestia/bin/v-change-user-rkey ".$v_user." ".$v_rkey."", $output, $return_var);
30-
unset($output);
29+
unlink($v_rkey);
3130
exec ($cmd." ".$v_user." json", $output, $return_var);
3231
$data = json_decode(implode('', $output), true);
3332
$name = $data[$user]['NAME'];

0 commit comments

Comments
 (0)