Timing attack fix from security experts https://arcturussecurity.com

This commit is contained in:
Serghey Rodin 2018-10-17 23:28:37 +03:00
commit 5f68c1b634

View file

@ -48,7 +48,7 @@ if ((!empty($_POST['user'])) && (!empty($_POST['code'])) && (!empty($_POST['pass
if ( $return_var == 0 ) {
$data = json_decode(implode('', $output), true);
$rkey = $data[$user]['RKEY'];
if ($rkey == $_POST['code']) {
if (hash_equals($rkey, $POST[code])) {
$v_password = tempnam("/tmp","vst");
$fp = fopen($v_password, "w");
fwrite($fp, $_POST['password']."\n");