Scope Mozilla cookie clearing to the configured application - #101
Open
OskarEichler wants to merge 2 commits into
Open
Scope Mozilla cookie clearing to the configured application#101OskarEichler wants to merge 2 commits into
OskarEichler wants to merge 2 commits into
Conversation
…igured application
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.
Summary
Restrict MozillaStore#clear to its configured appId and inBrowserElement, matching the scope used by the store's read/delete operations. Clear the selected store's in-memory session cookies as before.
Reproduction and verification
Four jars share a temporary SQLite database with different application/browser-element settings. Each contains one persistent cookie and one session cookie. Before this patch, clearing the first jar deletes all four persistent cookies. After this patch, only that jar is cleared; the other three retain both cookies. Fourteen assertions cover successive clears, preserved neighboring jars and return values.
Ruby 4.0.6, SQLite3 2.9.6: existing
rake testpasses 144 tests, 2,870 assertions, zero failures/errors. Targeted Ruby syntax andgit diff --checkpass. This patch changes only the clear statement, using bound values; no schema migration is involved.All checks use synthetic cookies and local temporary/in-memory SQLite databases. No repository tests were added or changed because this contribution's task explicitly prohibits test-file changes. Other Ruby versions and upstream CI remain unverified locally.
Compatibility / breaking changes
No API or dependency changes.
clearnow removes only this configured application's persistent cookies rather than all applications' cookies in the shared database. Callers relying on the former global deletion must clear each configured jar explicitly. The global database-capacity cleanup policy is unchanged.