Skip to content

Support multiple Microsoft cookie payload formats#961

Open
FoxYolk wants to merge 1 commit intoAlexProgrammerDE:mainfrom
FoxYolk:main
Open

Support multiple Microsoft cookie payload formats#961
FoxYolk wants to merge 1 commit intoAlexProgrammerDE:mainfrom
FoxYolk:main

Conversation

@FoxYolk
Copy link

@FoxYolk FoxYolk commented Mar 17, 2026

Replace the simple line-based parsing in loadFromString with splitAccountPayloads to better handle MICROSOFT_JAVA_COOKIES payloads. The new method trims input, returns empty for blank data, and for Microsoft cookie auth can detect cookie-jar (tab-separated entries containing login.live.com) or CookieEditor JSON arrays (simple starts/ends and contains "name"/"value"). Those formats are split on double-newlines, stripped, filtered and deduplicated; otherwise the original line-based splitting/stripping/filtering/distinct behavior is used. Added helper predicates looksLikeCookieJar and looksLikeCookieEditorJson.

Replace the simple line-based parsing in loadFromString with splitAccountPayloads to better handle MICROSOFT_JAVA_COOKIES payloads. The new method trims input, returns empty for blank data, and for Microsoft cookie auth can detect cookie-jar (tab-separated entries containing login.live.com) or CookieEditor JSON arrays (simple starts/ends and contains "name"/"value"). Those formats are split on double-newlines, stripped, filtered and deduplicated; otherwise the original line-based splitting/stripping/filtering/distinct behavior is used. Added helper predicates looksLikeCookieJar and looksLikeCookieEditorJson.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant