diff --git a/ArchiSteamFarm/BotConfig.cs b/ArchiSteamFarm/BotConfig.cs index 3d912c898..b6eb4adba 100644 --- a/ArchiSteamFarm/BotConfig.cs +++ b/ArchiSteamFarm/BotConfig.cs @@ -138,9 +138,11 @@ namespace ArchiSteamFarm { [JsonProperty] internal string SteamPassword { get; set; } - public bool ShouldSerializeSteamLogin() => false; - public bool ShouldSerializeSteamParentalPIN() => false; - public bool ShouldSerializeSteamPassword() => false; + private bool ShouldSerializeSensitiveDetails = true; + + public bool ShouldSerializeSteamLogin() => ShouldSerializeSensitiveDetails; + public bool ShouldSerializeSteamParentalPIN() => ShouldSerializeSensitiveDetails; + public bool ShouldSerializeSteamPassword() => ShouldSerializeSensitiveDetails; internal static BotConfig Load(string filePath) { if (string.IsNullOrEmpty(filePath)) { @@ -166,6 +168,8 @@ namespace ArchiSteamFarm { return null; } + botConfig.ShouldSerializeSensitiveDetails = false; + // Support encrypted passwords if ((botConfig.PasswordFormat != CryptoHelper.ECryptoMethod.PlainText) && !string.IsNullOrEmpty(botConfig.SteamPassword)) { // In worst case password will result in null, which will have to be corrected by user during runtime