Misc cleanup

This commit is contained in:
JustArchi
2022-10-10 22:50:36 +02:00
parent e6579e4355
commit 6227f84931
3 changed files with 2 additions and 3 deletions

View File

@@ -24,7 +24,6 @@ using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using ArchiSteamFarm.IPC.Integration;
using ArchiSteamFarm.IPC.Responses;
using ArchiSteamFarm.Localization;

View File

@@ -91,7 +91,7 @@ internal sealed class ApiAuthenticationMiddleware {
internal static void ClearFailedAuthorizations(object? state = null) => FailedAuthorizations.Clear();
internal static HashSet<IPAddress> GetCurrentlyBannedIPs() => FailedAuthorizations.Where(static kv => kv.Value >= MaxFailedAuthorizationAttempts).Select(static kv => kv.Key).ToHashSet();
internal static IEnumerable<IPAddress> GetCurrentlyBannedIPs() => FailedAuthorizations.Where(static kv => kv.Value >= MaxFailedAuthorizationAttempts).Select(static kv => kv.Key);
internal static bool UnbanIP(IPAddress ipAddress) {
ArgumentNullException.ThrowIfNull(ipAddress);

View File

@@ -317,7 +317,7 @@ internal static class Program {
return false;
}
ArchiCryptoHelper.SetEncryptionKey(cryptkey!);
ArchiCryptoHelper.SetEncryptionKey(cryptkey);
}
if (!Directory.Exists(SharedInfo.ConfigDirectory)) {