Merge pull request #19823 from harrywinner/15.0

FIX Solving non-blocking bug in user login
This commit is contained in:
Laurent Destailleur 2022-01-14 10:03:10 +01:00 committed by GitHub
commit 7d5c36ad02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2007-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007-2015 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2022 Harry Winner Kamdem <harry@sense.africa>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -104,7 +105,7 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes
}
// Check crypted password according to crypt algorithm
if ($cryptType == 'auto') {
if (dol_verifyHash($passtyped, $passcrypted, '0')) {
if ($passcrypted && dol_verifyHash($passtyped, $passcrypted, '0')) {
$passok = true;
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - hash ".$cryptType." of pass is ok");
}