1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-23 04:08:48 -05:00

Fixed order of initialization.

This commit is contained in:
Todd Martin 2025-04-20 21:33:23 -04:00
parent fb1b39e7c3
commit 038f666899
No known key found for this signature in database
GPG Key ID: 663E7AF5C839BC8F

View File

@ -78,8 +78,8 @@ public abstract class BaseRequestValidator<T> where T : class
CustomValidatorRequestContext validatorContext) CustomValidatorRequestContext validatorContext)
{ {
// 1. We need to check if the user's master password hash is correct. // 1. We need to check if the user's master password hash is correct.
var user = validatorContext.User;
var valid = await ValidateContextAsync(context, validatorContext); var valid = await ValidateContextAsync(context, validatorContext);
var user = validatorContext.User;
if (!valid) if (!valid)
{ {
await UpdateFailedAuthDetailsAsync(user, false, !validatorContext.KnownDevice); await UpdateFailedAuthDetailsAsync(user, false, !validatorContext.KnownDevice);