Fix DOM storage cleaning in Chromium/Firefox (fixes #2049)#2068
Fix DOM storage cleaning in Chromium/Firefox (fixes #2049)#2068chidoziemanagwu wants to merge 1 commit intobleachbit:masterfrom
Conversation
|
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, |
|
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. |
I'll be on standby if you need any changes xD |
|
All lines added by this PR to
In an unpublished change, I started reorganizing the options:
I propose:
|
Alright let me know when the everything is being reorganized then I update |
|
@chidoziemanagwu |
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.