diff --git a/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/Commands.cs b/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/Commands.cs index ee3734abf..3197dfcdc 100644 --- a/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/Commands.cs +++ b/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/Commands.cs @@ -251,7 +251,11 @@ internal static class Commands { if (!string.IsNullOrEmpty(activationCode)) { string? generatedCode = await mobileAuthenticator.GenerateToken().ConfigureAwait(false); - if (generatedCode != activationCode) { + if (string.IsNullOrEmpty(generatedCode)) { + return bot.Commands.FormatBotResponse(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, nameof(generatedCode))); + } + + if (!generatedCode.Equals(activationCode, StringComparison.OrdinalIgnoreCase)) { return bot.Commands.FormatBotResponse(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, $"{generatedCode} != {activationCode}")); } }