aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Core
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-10-25 16:05:12 -0500
committerJP Dillingham <jp@dillingham.me>2026-10-25 16:05:12 -0500
commit6de3be313ae26aac832d15dffef5400333200e09 (patch)
treeaf06bb9f40db4f8f6b314f7cd6c59779f4bb2523 /src/slskd/Core
parentb51f789bc3f15d5d8f9424f58f50014fbc58391a (diff)
parenta4cce04d38544ad6d4c1506b9facb32407a79509 (diff)
downloadslskd-6de3be313ae26aac832d15dffef5400333200e09.tar.gz
Merge remote-tracking branch 'origin' into auth
Diffstat (limited to 'src/slskd/Core')
-rw-r--r--src/slskd/Core/API/Controllers/ApplicationController.cs23
-rw-r--r--src/slskd/Core/Options.cs13
2 files changed, 0 insertions, 36 deletions
diff --git a/src/slskd/Core/API/Controllers/ApplicationController.cs b/src/slskd/Core/API/Controllers/ApplicationController.cs
index fc2e31a7..b90655aa 100644
--- a/src/slskd/Core/API/Controllers/ApplicationController.cs
+++ b/src/slskd/Core/API/Controllers/ApplicationController.cs
@@ -169,29 +169,6 @@ namespace slskd.Core.API
}
[ApiExplorerSettings(IgnoreApi = true)]
- [HttpGet("dump")]
- [Authorize(Policy = AuthPolicy.Any, Roles = AuthRole.AdministratorOnly)]
- public async Task<IActionResult> DumpMemory()
- {
- if (OptionsAtStartup.Flags.Dumpable)
- {
- Log.Warning("Dumping application memory...");
-
- using var dumper = new Dumper();
- var file = await dumper.DumpAsync();
-
- Log.Warning("Dump complete");
-
- // the dump contains everything in memory, including secrets. delete it once it has been sent
- var stream = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.None, bufferSize: 4096, FileOptions.DeleteOnClose);
- return File(stream, "application/octet-stream", "slskd.dmp");
- }
-
- Log.Warning("Unauthorized attempt to dump application memory; Flags.Dumpable is disabled");
- return Forbid();
- }
-
- [ApiExplorerSettings(IgnoreApi = true)]
[HttpPost("loopback")]
[Authorize(Policy = AuthPolicy.Any, Roles = AuthRole.ReadWriteOrAdministrator)]
public IActionResult Loopback([FromBody] object body)
diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs
index dd9c3d02..1f6ceac2 100644
--- a/src/slskd/Core/Options.cs
+++ b/src/slskd/Core/Options.cs
@@ -484,19 +484,6 @@ namespace slskd
public bool Volatile { get; init; } = false;
/// <summary>
- /// Gets a value indicating whether real-time memory dumping via API is enabled.
- /// </summary>
- /// <remarks>
- /// This can expose sensitive information, and should be turned on only to diagnose memory leaks.
- /// As such, it is and must remain undocumented.
- /// </remarks>
- [Argument(default, "dumpable")]
- [EnvironmentVariable("DUMPABLE")]
- [Description("enable run-time memory dumps via api")]
- [RequiresRestart]
- public bool Dumpable { get; init; } = false;
-
- /// <summary>
/// Gets a value indicating whether user-defined regular expressions are case sensitive.
/// </summary>
[Argument(default, "case-sensitive-regex")]