Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] CAD is deleting container tab cookies and localStorage #746

Closed
ghost opened this issue May 24, 2020 · 3 comments
Closed

[BUG] CAD is deleting container tab cookies and localStorage #746

ghost opened this issue May 24, 2020 · 3 comments
Assignees
Labels
bug Verified Bugs enhancement Firefox Items related to Mozilla Firefox
Milestone

Comments

@ghost
Copy link

ghost commented May 24, 2020

Describe the bug
I don't want CAD to delete cookies and localStorage in container tabs, only in the default environment. However, even though I have enable container tab support unchecked, when doing automatic cleaning CAD will automatically delete my container tab data after I closed it. Example log message (after closing duckduckgo, which always is in a container tab):

duckduckgo.com (CookieAutoDeleteLocalStorageCleanup): Clean because duckduckgo.com is not in the White or Grey lists

To Reproduce

Steps to reproduce the behavior:

  1. Open the CAD settings
  2. Enable automatic cleaning (after 60 secs)
  3. Enable greylist cleanup on browser restart
  4. Enable cleaning cookies from open tabs on startup
  5. Enable LocalStorage cleanup
  6. Make sure support for firefox container tabs is disabled
  7. Open a website like duckduckgo in a container tab
  8. Close the container tab
  9. CAD notifies you about it having busted the sites cookies and LocalStorage

Expected behavior

CAD should keep the data.

Your System Info (please complete the following information):

  • OS: Windows 10 Pro, the malware monster
  • Browser Info: Firefox 76.0.1
  • CookieAutoDelete Version 3.3.1
@ghost ghost added the untested bug/issue Issues that have yet to be tested as per instructions label May 24, 2020
@kennethtran93
Copy link
Member

kennethtran93 commented May 24, 2020

The only problem I have at this time is that even if I have the container/store ID hardcoded for chrome (0) and firefox (firefox-default, maybe default as well), some browsers may have other default cookie stores that we may have not heard of. The only way to fetch these unknown cookie stores is by https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/cookies/getAllCookieStores, which returns the ID for us to query. This ID doesn't tell us whether or not it is a container or default, so we add it in to the list for cleaning.

If you don't want cookies removed from container tabs at this time, enable the container option in CAD, and for each container, add a * whitelist in the Expression Table.

@kennethtran93
Copy link
Member

kennethtran93 commented May 25, 2020

The only mitigation I can do is from getAllCookieStores, if there is an id that starts with firefox-container then ignore it. This would do the trick only if browsers in other languages also use storeID names in english...

For the meantime, use the above as a workaround.

@kennethtran93 kennethtran93 added bug Verified Bugs enhancement Firefox Items related to Mozilla Firefox and removed untested bug/issue Issues that have yet to be tested as per instructions labels May 25, 2020
@kennethtran93 kennethtran93 added this to the 3.3.2 milestone May 25, 2020
@kennethtran93 kennethtran93 self-assigned this May 25, 2020
@kennethtran93
Copy link
Member

Based on the steps you've given me the quickfix patch seems to resolve the issue.

You can test it if you want and know how to download the repo source to build it.

@kennethtran93 kennethtran93 modified the milestones: 3.3.2, 3.4.0 Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified Bugs enhancement Firefox Items related to Mozilla Firefox
Projects
None yet
Development

No branches or pull requests

1 participant