login/pass: set user cookie after token reset
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 10 Feb 2019 07:58:52 +0000 (08:58 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Sun, 10 Feb 2019 08:22:03 +0000 (09:22 +0100)
Value became invalid after changes to hashing and edit page.

login/pass.inc.php

index 59679048eda00ef3f7341638524b75f8d03c42e0..986b4c262a91d4b8e8515c14423f24726bb027a0 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-function passform($user, $input = [])
+function passform(&$user, $input = [])
 {
        if (empty($user)) {
                return "Log eerst (opnieuw?) in.";
@@ -43,7 +43,7 @@ function passform($user, $input = [])
 
        @unlink("{$user['dir']}/.token"); # invalidate reset token
 
-       $authhash = md5($input['newpass']);
+       $authhash = md5($passstore);
        $user['auth'] = "{$user['name']}:$authhash";
        if ($GLOBALS['User'] === $user) {
                login_setcookie();