Skip to content

Commit

Permalink
Merge branch '5.2' into 5
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Mar 9, 2024
2 parents 5ab9ded + c36df38 commit 8f48e9b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Security/Member.php
Original file line number Diff line number Diff line change
Expand Up @@ -521,13 +521,11 @@ public function encryptWithUserSettings($string)

// 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);
}

Expand Down

0 comments on commit 8f48e9b

Please sign in to comment.