Skip to content

Scope Mozilla cookie clearing to the configured application - #101

Open
OskarEichler wants to merge 2 commits into
sparklemotion:masterfrom
OskarEichler:codex/scope-mozilla-cookie-clear
Open

Scope Mozilla cookie clearing to the configured application#101
OskarEichler wants to merge 2 commits into
sparklemotion:masterfrom
OskarEichler:codex/scope-mozilla-cookie-clear

Conversation

@OskarEichler

Copy link
Copy Markdown

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 test passes 144 tests, 2,870 assertions, zero failures/errors. Targeted Ruby syntax and git diff --check pass. 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. clear now 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.

@OskarEichler
OskarEichler requested a review from knu as a code owner August 27, 2026 18:56
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