From 7387d568548af0898d9fd2b716d3bb16b6d9be2b Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Tue, 21 Sep 2021 08:14:46 -0500 Subject: add JsonIgnore to sensitive option fields --- src/slskd/Options.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/slskd/Options.cs b/src/slskd/Options.cs index 01eeacd7..b1e1a9a9 100644 --- a/src/slskd/Options.cs +++ b/src/slskd/Options.cs @@ -26,6 +26,7 @@ namespace slskd using System.Diagnostics; using System.IO; using System.Linq; + using System.Text.Json.Serialization; using System.Text.RegularExpressions; using FluentFTP; using slskd.Configuration; @@ -442,6 +443,7 @@ namespace slskd [EnvironmentVariable("SLSK_PASSWORD")] [Description("password for the Soulseek network")] [RequiresReconnect] + [JsonIgnore] public string Password { get; private set; } = null; /// @@ -592,6 +594,7 @@ namespace slskd [EnvironmentVariable("SLSK_PROXY_PASSWORD")] [Description("connection proxy password")] [StringLength(255, MinimumLength = 1)] + [JsonIgnore] public string Password { get; private set; } /// @@ -719,6 +722,7 @@ namespace slskd [EnvironmentVariable("PASSWORD")] [Description("password for web UI")] [StringLength(255, MinimumLength = 1)] + [JsonIgnore] public string Password { get; private set; } = Program.AppName; /// @@ -809,6 +813,7 @@ namespace slskd [EnvironmentVariable("HTTPS_CERT_PASSWORD")] [Description("X509 certificate password")] [RequiresRestart] + [JsonIgnore] public string Password { get; private set; } } } @@ -892,6 +897,7 @@ namespace slskd [Argument(default, "ftp-password")] [EnvironmentVariable("FTP_PASSWORD")] [Description("FTP password")] + [JsonIgnore] public string Password { get; private set; } /// -- cgit v1.2.3