mirror of
https://github.com/opnsense/core.git
synced 2026-10-12 02:20:36 +00:00
system: switch password hashing from bcrypt to argon2id
A bit unfortunate both spots exist, but maybe that can change later on.
This commit is contained in:
@@ -453,7 +453,7 @@ function local_user_set_password(&$user, $password = null)
|
||||
proc_close($process);
|
||||
}
|
||||
} else {
|
||||
$hash = password_hash($password, PASSWORD_BCRYPT, [ 'cost' => 11 ]);
|
||||
$hash = password_hash($password, PASSWORD_ARGON2ID);
|
||||
}
|
||||
|
||||
if ($hash !== false && strpos($hash, '$') === 0) {
|
||||
|
||||
@@ -181,7 +181,7 @@ class User extends BaseModel
|
||||
proc_close($process);
|
||||
}
|
||||
} else {
|
||||
$hash = password_hash($password, PASSWORD_BCRYPT, [ 'cost' => 11 ]);
|
||||
$hash = password_hash($password, PASSWORD_ARGON2ID);
|
||||
}
|
||||
return $hash;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user