mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2025-12-16 20:33:03 +00:00
Fix cookie parsing condition to properly handle missing semicolon
Co-authored-by: qaiu <29825328+qaiu@users.noreply.github.com>
This commit is contained in:
@@ -176,7 +176,7 @@ public class PlaygroundApi {
|
|||||||
startIndex += SESSION_KEY.length();
|
startIndex += SESSION_KEY.length();
|
||||||
int endIndex = cookie.indexOf(";", startIndex);
|
int endIndex = cookie.indexOf(";", startIndex);
|
||||||
|
|
||||||
if (endIndex > startIndex) {
|
if (endIndex != -1) {
|
||||||
return cookie.substring(startIndex, endIndex).trim();
|
return cookie.substring(startIndex, endIndex).trim();
|
||||||
} else {
|
} else {
|
||||||
return cookie.substring(startIndex).trim();
|
return cookie.substring(startIndex).trim();
|
||||||
|
|||||||
Reference in New Issue
Block a user