Merge branch '5.2' into 5

This commit is contained in:
github-actions 2024-03-09 14:25:06 +00:00
commit 8f48e9bd71
1 changed files with 1 additions and 3 deletions

View File

@ -521,13 +521,11 @@ class Member extends DataObject
// If the algorithm or salt is not available, it means we are operating
// on legacy account with unhashed password. Do not hash the string.
if (!$this->PasswordEncryption) {
if (!$this->PasswordEncryption || !$this->Salt) {
return $string;
}
// We assume we have PasswordEncryption and Salt available here.
$e = PasswordEncryptor::create_for_algorithm($this->PasswordEncryption);
return $e->encrypt($string, $this->Salt);
}