This commit is contained in:
JustArchi
2019-01-04 15:46:31 +01:00
parent 1b6718b545
commit 9810461c74

View File

@@ -288,13 +288,14 @@ namespace ArchiSteamFarm {
// If we ever need to correct this, we also need to clean up other places // If we ever need to correct this, we also need to clean up other places
const string deviceIdentifier = "android:"; 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; return false;
} }
// Dashes are optional in the ID, strip them off for comparison
string hash = deviceID.Substring(deviceIdentifier.Length).Replace("-", ""); 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) { private string GenerateConfirmationHash(uint time, string tag = null) {