From a004becc95ac6357096b8a10db4a3b6ceea8fbcd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 7 Dec 2025 05:52:17 +0000 Subject: [PATCH] Fix cookie parsing condition to properly handle missing semicolon Co-authored-by: qaiu <29825328+qaiu@users.noreply.github.com> --- .../src/main/java/cn/qaiu/lz/web/controller/PlaygroundApi.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web-service/src/main/java/cn/qaiu/lz/web/controller/PlaygroundApi.java b/web-service/src/main/java/cn/qaiu/lz/web/controller/PlaygroundApi.java index 9a9a539..a5a1f0b 100644 --- a/web-service/src/main/java/cn/qaiu/lz/web/controller/PlaygroundApi.java +++ b/web-service/src/main/java/cn/qaiu/lz/web/controller/PlaygroundApi.java @@ -176,7 +176,7 @@ public class PlaygroundApi { startIndex += SESSION_KEY.length(); int endIndex = cookie.indexOf(";", startIndex); - if (endIndex > startIndex) { + if (endIndex != -1) { return cookie.substring(startIndex, endIndex).trim(); } else { return cookie.substring(startIndex).trim();