Merge pull request #1727 from serghey-rodin/madeITBelgium-patch-4

Fix bug in password reset
This commit is contained in:
Serghey Rodin 2018-10-18 12:21:00 +03:00 committed by GitHub
commit 14c093a6a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 (hash_equals($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");