mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-22 13:40:37 +02:00
Make IncrementInvalidLoginAttemptCount async.
This commit is contained in:
parent
0750357916
commit
0c5ac10a68
|
@ -512,7 +512,7 @@ namespace Jellyfin.Server.Implementations.Users
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IncrementInvalidLoginAttemptCount(user);
|
await IncrementInvalidLoginAttemptCount(user).ConfigureAwait(false);
|
||||||
_logger.LogInformation(
|
_logger.LogInformation(
|
||||||
"Authentication request for {UserName} has been denied (IP: {IP}).",
|
"Authentication request for {UserName} has been denied (IP: {IP}).",
|
||||||
user.Username,
|
user.Username,
|
||||||
|
@ -882,7 +882,7 @@ namespace Jellyfin.Server.Implementations.Users
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void IncrementInvalidLoginAttemptCount(User user)
|
private async Task IncrementInvalidLoginAttemptCount(User user)
|
||||||
{
|
{
|
||||||
user.InvalidLoginAttemptCount++;
|
user.InvalidLoginAttemptCount++;
|
||||||
int? maxInvalidLogins = user.LoginAttemptsBeforeLockout;
|
int? maxInvalidLogins = user.LoginAttemptsBeforeLockout;
|
||||||
|
@ -896,7 +896,7 @@ namespace Jellyfin.Server.Implementations.Users
|
||||||
user.InvalidLoginAttemptCount);
|
user.InvalidLoginAttemptCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateUser(user);
|
await UpdateUserAsync(user).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue