mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-29 04:39:56 +03:00
merge r21236 from branch 2.5 to trunk
bug 2861: avoid "invalid password" with manual upgrade and admin session expired git-svn-id: http://piwigo.org/svn/trunk@22005 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
1965cbd9c8
commit
f23b5fbcae
1 changed files with 6 additions and 1 deletions
|
@ -1161,8 +1161,13 @@ function pwg_password_verify($password, $hash, $user_id=null)
|
|||
$check = ($hash == md5($password));
|
||||
}
|
||||
|
||||
if ($check and isset($user_id) and !$conf['external_authentification'])
|
||||
if ($check)
|
||||
{
|
||||
if (!isset($user_id) or $conf['external_authentification'])
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Rehash using new hash.
|
||||
$hash = pwg_password_hash($password);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue