Fix startup crash caused by corrupted cookie store - #6944
Open
arpitJ-dev wants to merge 1 commit into
Open
Conversation
arpitJ-dev
marked this pull request as ready for review
August 16, 2026 02:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description (required)
Fixes #6915
CommonsCookieStorage.load()previously allowed malformed persisted cookie data to throw during application startup, leaving both the main process and ACRA process in a persistent crash loop.This change treats an unreadable cookie store as an invalid saved session. It keeps the in-memory cookie collection empty, removes only the corrupted
cookie_storepreference, logs the recovery, and leaves unrelated preferences intact. Valid cookie stores and the existing plaintext-to-encrypted migration behavior are unchanged.Unit tests cover malformed and truncated JSON, JSON
null, blank values, incorrect top-level types, invalid domain values, valid empty and populated stores, invalid individual cookies, unrelated-preference preservation, and repeated loading after recovery.Tests performed (required)
CommonsCookieStorageTestand adjacentJsonKvStoreTestsuites on BetaDebug: 16 tests, 0 failures.null, a top-level array, an invalid domain value, and whitespace-only data.Screenshots (for UI changes only)
Not applicable; this change has no UI modifications.