From fb3859d8756541b2e6c3d9ab94a5084a33e0188a Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Mon, 23 Aug 2021 15:07:15 +0200 Subject: [PATCH] KTOR-2584 Remove invalid session id (#2585) --- .../jvm/src/io/ktor/sessions/SessionTrackerById.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ktor-server/ktor-server-core/jvm/src/io/ktor/sessions/SessionTrackerById.kt b/ktor-server/ktor-server-core/jvm/src/io/ktor/sessions/SessionTrackerById.kt index f32d67ec75f..aa7b293dad6 100644 --- a/ktor-server/ktor-server-core/jvm/src/io/ktor/sessions/SessionTrackerById.kt +++ b/ktor-server/ktor-server-core/jvm/src/io/ktor/sessions/SessionTrackerById.kt @@ -85,8 +85,8 @@ public class SessionTrackerById( ) } - // we remove the wrong session identifier if no related session found - call.attributes.put(sessionIdKey, sessionId) + // Remove the wrong session identifier if no related session was found + call.attributes.remove(sessionIdKey) return null }