Fix passwords with non-ASCII characters

This commit is contained in:
JustArchi 2016-10-05 11:52:15 +02:00
parent 5c686397dd
commit 6f55e0dd33

View file

@ -1737,9 +1737,16 @@ namespace ArchiSteamFarm {
Logging.LogGenericInfo("Logging in...", BotName);
string password = BotConfig.SteamPassword;
if (!string.IsNullOrEmpty(password)) {
// Steam silently ignores non-ASCII characters in password, we're going to do the same
// Don't ask me why, I know it's stupid
password = Regex.Replace(password, @"[^\u0000-\u007F]+", "");
}
SteamUser.LogOnDetails logOnDetails = new SteamUser.LogOnDetails {
Username = BotConfig.SteamLogin,
Password = BotConfig.SteamPassword,
Password = password,
AuthCode = AuthCode,
CellID = Program.GlobalDatabase.CellID,
LoginID = LoginID,