Fix cookie parsing condition to properly handle missing semicolon

Co-authored-by: qaiu <29825328+qaiu@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-07 05:52:17 +00:00
parent 8c92150c81
commit a004becc95

View File

@@ -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();