mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-19 13:01:51 -07:00
Timing attack fix from security experts https://arcturussecurity.com
This commit is contained in:
parent
67a0e8d108
commit
5f68c1b634
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ if ((!empty($_POST['user'])) && (!empty($_POST['code'])) && (!empty($_POST['pass
|
||||||
if ( $return_var == 0 ) {
|
if ( $return_var == 0 ) {
|
||||||
$data = json_decode(implode('', $output), true);
|
$data = json_decode(implode('', $output), true);
|
||||||
$rkey = $data[$user]['RKEY'];
|
$rkey = $data[$user]['RKEY'];
|
||||||
if ($rkey == $_POST['code']) {
|
if (hash_equals($rkey, $POST[‘code’])) {
|
||||||
$v_password = tempnam("/tmp","vst");
|
$v_password = tempnam("/tmp","vst");
|
||||||
$fp = fopen($v_password, "w");
|
$fp = fopen($v_password, "w");
|
||||||
fwrite($fp, $_POST['password']."\n");
|
fwrite($fp, $_POST['password']."\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue