Phan and phpstan fixes

Note that ACL\Login FIXME will be fixed later do not change any current
functionality
This commit is contained in:
Clemens Schwaighofer
2022-03-16 09:01:33 +09:00
parent 38903020fb
commit 105e0d69a1
7 changed files with 29 additions and 16 deletions

View File

@@ -367,8 +367,14 @@ class Login extends \CoreLibs\DB\IO
}
// first, errors on missing encryption
if (
// below is all deprecated. all the ones below will always be true
// all the crypt standards are always set
// FIXME: remove this error code
/** @phpstan-ignore-next-line Why? */
(preg_match("/^\\$2(a|y)\\$/", $hash) && CRYPT_BLOWFISH != 1) ||
/** @phpstan-ignore-next-line Why? */
(preg_match("/^\\$1\\$/", $hash) && CRYPT_MD5 != 1) ||
/** @phpstan-ignore-next-line Why? */
(preg_match("/^\\$[0-9A-Za-z.]{12}$/", $hash) && CRYPT_STD_DES != 1)
) {
// this means password cannot be decrypted because of missing crypt methods