mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-14 17:07:35 +00:00
Do not record failed attempts on empty passwords
This commit is contained in:
parent
d3c2dabef7
commit
738b70e57a
1 changed files with 7 additions and 1 deletions
|
@ -102,7 +102,13 @@ namespace ArchiSteamFarm.IPC.Integration {
|
|||
return HttpStatusCode.Unauthorized;
|
||||
}
|
||||
|
||||
bool authorized = passwords.First() == ASF.GlobalConfig.IPCPassword;
|
||||
string inputPassword = passwords.FirstOrDefault(password => !string.IsNullOrEmpty(password));
|
||||
|
||||
if (string.IsNullOrEmpty(inputPassword)) {
|
||||
return HttpStatusCode.Unauthorized;
|
||||
}
|
||||
|
||||
bool authorized = inputPassword == ASF.GlobalConfig.IPCPassword;
|
||||
|
||||
await AuthorizationSemaphore.WaitAsync().ConfigureAwait(false);
|
||||
|
||||
|
|
Loading…
Reference in a new issue