From be6a4774e5beed6541d0f2d3f3f2ca6bd5b843d4 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 15 Nov 2026 17:55:18 -0600 Subject: extend challenge token cache to 60 seconds (from 10) --- src/slskd/Relay/RelayService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/slskd') diff --git a/src/slskd/Relay/RelayService.cs b/src/slskd/Relay/RelayService.cs index 26a635a1..ed035852 100644 --- a/src/slskd/Relay/RelayService.cs +++ b/src/slskd/Relay/RelayService.cs @@ -366,8 +366,8 @@ namespace slskd.Relay { var token = Cryptography.Random.GetBytes(32).ToBase62(); - // this token is only valid for this connection id for a short time this is important to prevent replay-type attacks. - MemoryCache.Set(GetAuthTokenCacheKey(connectionId), token, TimeSpan.FromSeconds(10)); + // this token is only valid for this connection id for a short time; this is important to prevent replay-type attacks. + MemoryCache.Set(GetAuthTokenCacheKey(connectionId), token, TimeSpan.FromMinutes(1)); Log.Debug("Cached auth token {Token} for ID {Id}", token, connectionId); return token; } -- cgit v1.2.3