mirror of
https://github.com/bitwarden/server.git
synced 2025-06-13 06:20:48 -05:00
PM-20532 - Refactor name of input param in ISendPasswordHasher.cs
This commit is contained in:
parent
af934a2bee
commit
553169724b
@ -2,6 +2,6 @@
|
||||
|
||||
public interface ISendPasswordHasher
|
||||
{
|
||||
bool VerifyPasswordHash(string sendPasswordHash, string userSubmittedPasswordHash);
|
||||
bool VerifyPasswordHash(string sendPasswordHash, string inputPasswordHash);
|
||||
string HashPasswordHash(string clientHashedPassword);
|
||||
}
|
||||
|
@ -6,15 +6,15 @@ namespace Bit.Core.KeyManagement.Sends;
|
||||
public class SendPasswordHasher(IPasswordHasher<User> passwordHasher) : ISendPasswordHasher
|
||||
{
|
||||
/// <summary>
|
||||
/// Verifies an existing send password hash against a new user submitted password hash.
|
||||
/// Verifies an existing send password hash against a new input password hash.
|
||||
/// </summary>
|
||||
public bool VerifyPasswordHash(string sendPasswordHash, string userSubmittedPasswordHash)
|
||||
public bool VerifyPasswordHash(string sendPasswordHash, string inputPasswordHash)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(sendPasswordHash) || string.IsNullOrWhiteSpace(userSubmittedPasswordHash))
|
||||
if (string.IsNullOrWhiteSpace(sendPasswordHash) || string.IsNullOrWhiteSpace(inputPasswordHash))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var passwordResult = passwordHasher.VerifyHashedPassword(new User(), sendPasswordHash, userSubmittedPasswordHash);
|
||||
var passwordResult = passwordHasher.VerifyHashedPassword(new User(), sendPasswordHash, inputPasswordHash);
|
||||
|
||||
return passwordResult is PasswordVerificationResult.Success or PasswordVerificationResult.SuccessRehashNeeded;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user