diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-11-15 17:55:18 -0600 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-11-15 17:55:18 -0600 |
| commit | be6a4774e5beed6541d0f2d3f3f2ca6bd5b843d4 (patch) | |
| tree | ac2c50e74242a4c854c73822b433f103229315e8 /src/slskd | |
| parent | e0a777403e15eaeefc7881d9451aef2f26bf3f4c (diff) | |
| download | slskd-be6a4774e5beed6541d0f2d3f3f2ca6bd5b843d4.tar.gz | |
extend challenge token cache to 60 seconds (from 10)
Diffstat (limited to 'src/slskd')
| -rw-r--r-- | src/slskd/Relay/RelayService.cs | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |
