From 5c1cdfd24f4344bbc011a69b69979bfd5695e9aa Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Thu, 29 Jan 2026 08:03:01 -0600 Subject: add redact for overlay --- src/slskd/Core/Extensions.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/slskd/Core/Extensions.cs') diff --git a/src/slskd/Core/Extensions.cs b/src/slskd/Core/Extensions.cs index db75cc9c..707daa88 100644 --- a/src/slskd/Core/Extensions.cs +++ b/src/slskd/Core/Extensions.cs @@ -41,6 +41,21 @@ namespace slskd return redacted; } + /// + /// Redacts this instance of Options, replacing properties marked with with '*****'. + /// + /// + /// Creates a deep clone before redacting. + /// + /// The Options instance to redact. + /// A redacted instance. + public static OptionsOverlay Redact(this OptionsOverlay options) + { + var redacted = options.ToJson().FromJson(); + Redactor.Redact(redacted, redactWith: "*****"); + return redacted; + } + /// /// Creates a copy of this instance with the specified parameters changed. /// -- cgit v1.2.3 From 183315d6d9696a79ef0b371507d573d16b02a261 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Fri, 30 Jan 2026 09:44:38 -0600 Subject: Update src/slskd/Core/Extensions.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/slskd/Core/Extensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/slskd/Core/Extensions.cs') diff --git a/src/slskd/Core/Extensions.cs b/src/slskd/Core/Extensions.cs index 707daa88..0789fa38 100644 --- a/src/slskd/Core/Extensions.cs +++ b/src/slskd/Core/Extensions.cs @@ -42,12 +42,12 @@ namespace slskd } /// - /// Redacts this instance of Options, replacing properties marked with with '*****'. + /// Redacts this instance of OptionsOverlay, replacing properties marked with with '*****'. /// /// /// Creates a deep clone before redacting. /// - /// The Options instance to redact. + /// The OptionsOverlay instance to redact. /// A redacted instance. public static OptionsOverlay Redact(this OptionsOverlay options) { -- cgit v1.2.3