Bug 1688665 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

`QuotaCleaner#deleteByPrincipal` over-clears storage if the legacy localStorage and sessionStorage implementation is enabled.

It only passes a host here:
https://searchfox.org/mozilla-central/rev/4dac9993b609fccc87e82682614faf2a44cda306/toolkit/components/cleardata/ClearDataService.jsm#473,480
This means that  the StorageObserver will clear all localStorage and sessionStorage for a host, without taking origin attributes into account:
https://searchfox.org/mozilla-central/rev/4dac9993b609fccc87e82682614faf2a44cda306/dom/storage/StorageObserver.cpp#294,316

Looking at the interface, it seems that the legacy implementation does not support clearing by full origin: https://searchfox.org/mozilla-central/rev/4dac9993b609fccc87e82682614faf2a44cda306/dom/storage/PBackgroundStorage.ipdl#51
`QuotaCleaner#deleteByPrincipal` over-clears sessionStorage and legacy localStorage.

It only passes a host here:
https://searchfox.org/mozilla-central/rev/4dac9993b609fccc87e82682614faf2a44cda306/toolkit/components/cleardata/ClearDataService.jsm#473,480
This means that  the StorageObserver will clear all localStorage and sessionStorage for a host, without taking origin attributes into account:
https://searchfox.org/mozilla-central/rev/4dac9993b609fccc87e82682614faf2a44cda306/dom/storage/StorageObserver.cpp#294,316

Looking at the interface, it seems that the legacy implementation does not support clearing by full origin: https://searchfox.org/mozilla-central/rev/4dac9993b609fccc87e82682614faf2a44cda306/dom/storage/PBackgroundStorage.ipdl#51

Back to Bug 1688665 Comment 0