Fix DOM storage cleaning in Chromium/Firefox (fixes #2049)#2068
Open
chidoziemanagwu wants to merge 1 commit intobleachbit:masterfrom
Open
Fix DOM storage cleaning in Chromium/Firefox (fixes #2049)#2068chidoziemanagwu wants to merge 1 commit intobleachbit:masterfrom
chidoziemanagwu wants to merge 1 commit intobleachbit:masterfrom
Conversation
Contributor
Author
|
Hi @azieman, I am following up on this pull request. Please let me know if you have any feedback or if further changes are required for it to be merged. Best regards, |
Member
|
At high level, there are many good things here. I will take a close look as get back to you if any changes are needed. It so happens I was editing some of the same code for different reasons. I haven't published them yet, and I'll plan to merge this first. |
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.
Fix Issue #2049: Persistent HTML5 cookies not cleared
Context
This Pull Request resolves Issue #2049 where persistent HTML5 cookies and offline storage (such as IndexedDB and Service Workers) survive cleaning when the "DOM storage" option is checked in Chromium-based browsers.
Modern browsers have heavily migrated to new subdirectories for partitioned DOM storage which were completely ignored by the existing "DOM Storage" configurations in BleachBit's cleaners. Furthermore, Chrome's
QuotaManagerwas not being purged, causing the browser UI to constantly display "ghost" tracking data inchrome://settings/content/alleven when the underlying cache data was wiped.The Approach
I thoroughly patched the
domstorage definition in all Chromium-based cleaner files (as well as the equivalentstorage/default/structure infirefox.xml) to comprehensively eradicate modern persistent site data.1. Added Modern DOM Storage Paths
I injected
IndexedDB,Service Worker, andSession Storagepaths to the<option id="dom">blocks forgoogle_chrome.xml,chromium.xml,brave.xml,microsoft_edge.xml, andopera.xml.Example implementation added to cleaners:
2. Purged QuotaManager Registration
To prevent the "ghost cookie" issue, I added
QuotaManagerand the modernWebStorage/QuotaManagerpaths to thedomoptions for all Chromium cleaners so the internal registry is safely wiped alongside the data. (Also addedWebStorage/QuotaManagerexplicitly to Google Chrome'shistoryoption to maintain parity).Example implementation:
3. Firefox Parity
Added the modern
storage/default/http*architecture tofirefox.xml'sdomoption so Firefox users can also effectively delete DOM storage without needing to fully wipe standard "Cookies".Testing & Verification
All changes were thoroughly verified via BleachBit's regression test suite and CLI preview utilities:
Additionally, a manual Ghost Cookie reproduction was simulated: Toggling DOM Storage and previewing operations now permanently drops the
QuotaManagerdatabase, ensuring that navigating tochrome://settings/content/allsuccessfully reflects the erased site origins.Impact
This brings BleachBit's "DOM Storage" capabilities up to parity with the modern HTML5 persistence architecture utilized by Chrome and Firefox. By expanding these capabilities across Chromium derivatives (Brave, Edge, Opera), users are guaranteed that malicious offline-workers, IndexedDB super-cookies, and tracking registries are completely obliterated when utilizing the DOM Storage cleaner toggle.