From 9810461c74942f2fc88ef4f2d0f55a7b3f2fd884 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Fri, 4 Jan 2019 15:46:31 +0100 Subject: [PATCH] Closes #1007 --- ArchiSteamFarm/MobileAuthenticator.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ArchiSteamFarm/MobileAuthenticator.cs b/ArchiSteamFarm/MobileAuthenticator.cs index 6039f5c54..e4beb9dde 100644 --- a/ArchiSteamFarm/MobileAuthenticator.cs +++ b/ArchiSteamFarm/MobileAuthenticator.cs @@ -288,13 +288,14 @@ namespace ArchiSteamFarm { // If we ever need to correct this, we also need to clean up other places const string deviceIdentifier = "android:"; - if (!deviceID.StartsWith(deviceIdentifier, StringComparison.Ordinal) || (deviceID.Length != deviceIdentifier.Length + 36)) { + if (!deviceID.StartsWith(deviceIdentifier, StringComparison.Ordinal) || (deviceID.Length <= deviceIdentifier.Length)) { return false; } + // Dashes are optional in the ID, strip them off for comparison string hash = deviceID.Substring(deviceIdentifier.Length).Replace("-", ""); - return (hash.Length == 32) && Utilities.IsValidHexadecimalString(hash); + return Utilities.IsValidHexadecimalString(hash); } private string GenerateConfirmationHash(uint time, string tag = null) {