Enable password hashing with argon2id algorithm on supported systems (PHP 7.3+)

This commit is contained in:
Kijin Sung 2023-04-24 01:06:54 +09:00
parent a6774937a2
commit ee5404eab6
2 changed files with 71 additions and 1 deletions

View file

@ -172,6 +172,10 @@ class MemberAdminView extends Member
$column_info = $oDB->getColumnInfo('member', 'password');
$password_maxlength = intval($column_info->size);
$password_algos = Rhymix\Framework\Password::getSupportedAlgorithms();
if ($password_maxlength < 128 && isset($password_algos['argon2id']))
{
$password_algos['argon2id'] = false;
}
if ($password_maxlength < 128 && isset($password_algos['sha512']))
{
$password_algos['sha512'] = false;