mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Closes #1007
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user