mirror of
https://github.com/bitwarden/server.git
synced 2025-04-27 07:42:15 -05:00
Fix bug where password was not validated during reset enrollment when sso config was disabled (#5677)
This commit is contained in:
parent
735dcb7653
commit
d818a271dd
@ -494,7 +494,7 @@ public class OrganizationUsersController : Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
var ssoConfig = await _ssoConfigRepository.GetByOrganizationIdAsync(orgId);
|
var ssoConfig = await _ssoConfigRepository.GetByOrganizationIdAsync(orgId);
|
||||||
var isTdeEnrollment = ssoConfig != null && ssoConfig.GetData().MemberDecryptionType == MemberDecryptionType.TrustedDeviceEncryption;
|
var isTdeEnrollment = ssoConfig != null && ssoConfig.Enabled && ssoConfig.GetData().MemberDecryptionType == MemberDecryptionType.TrustedDeviceEncryption;
|
||||||
if (!isTdeEnrollment && !string.IsNullOrWhiteSpace(model.ResetPasswordKey) && !await _userService.VerifySecretAsync(user, model.MasterPasswordHash))
|
if (!isTdeEnrollment && !string.IsNullOrWhiteSpace(model.ResetPasswordKey) && !await _userService.VerifySecretAsync(user, model.MasterPasswordHash))
|
||||||
{
|
{
|
||||||
throw new BadRequestException("Incorrect password");
|
throw new BadRequestException("Incorrect password");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user