Brave-browser: "Keep local data only until you quit your browser" only deletes cookies, not local storage

Created on 14 Sep 2018  路  16Comments  路  Source: brave/brave-browser

Description

Enabling "Keep local data only until you quit your browser" doesn't clear local storage.

Steps to Reproduce

  1. Enable "Content settings -> Cookies -> Keep local data only until you quit your browser"
  2. In settings, click "Clear browsing data" (time range: "All time", and check all boxes)
  3. Go to "Content settings -> Cookies -> See all cookies and site data" and confirm the list is empty
  4. Go to https://github.com/ (this will create cookies and "local storage")
  5. Restart Brave

Actual result:

"Content settings -> Cookies -> All cookies and site data" will not be fully cleared, it still contains "Local storage" items.

Expected result:

All local cache should be cleared

Reproduces how often:

Always

Brave version (chrome://version info)

Brave   0.55.3 Chromium: 70.0.3538.12 (Official Build) dev (64-bit)
Revision    ad61584ca32115f953ce656dd75b44f1c502a75d-refs/branch-heads/3538@{#179}
OS  Mac OS X  (10.13.6)

Reproducible on current release:

Website problems only:

  • Is the issue reproducible on the latest version of Chrome?
    I cloud not reproduce this in Chromium (installed with brew cask install chromium):
Chromium    71.0.3553.0 (Developer Build) (64-bit)
Revision    c260c9a88bad63450919aa5f953dcbe8f0b874d4-refs/heads/master@{#591310}

Additional Information

QYes bug featurglobal-settings prioritP2 privacy

Most helpful comment

There are more type of items not being deleted on quit, the ones i have seen are: "Database storage", "Service workers" and "File System"

All 16 comments

There are more type of items not being deleted on quit, the ones i have seen are: "Database storage", "Service workers" and "File System"

Relevant thread: https://twitter.com/ctavan/status/1044282084020441088

So this issue seems to also exist in Google Chrome Version 69.0.3497.100 (Official Build) (64-bit) on macOS 10.13.6.

However, I tested and could not reproduce it, on macOS 10.14 (18A391), in Chromium:
71.0.3553.0 (Developer Build) (64-bit)
70.0.3538.0 (Developer Build) (64-bit)
69.0.3497.0 (Developer Build) (64-bit)

Related: #492

Relevant thread: https://twitter.com/ctavan/status/1044282084020441088

So this issue seems to also exist in Google Chrome Version 69.0.3497.100 (Official Build) (64-bit) on macOS 10.13.6.

However, I tested and could not reproduce it, on macOS 10.14 (18A391), in Chromium:
71.0.3553.0 (Developer Build) (64-bit)
70.0.3538.0 (Developer Build) (64-bit)
69.0.3497.0 (Developer Build) (64-bit)

For a browser (Brave) focusing on privacy and security, this seems to be top priority to overcome this issue. Now I have to rely on third-party extensions to make sure "clear all data upon exit" really does what it says.

Maybe this'll be fixed if we enable the #rewrite-leveldb-on-deletion flag in Chromium? WDYT, @diracdeltas?

Mentioned in #2249 (dupe): https://bugs.chromium.org/p/chromium/issues/detail?id=823071 is supposedly the Chromium issue causing this.

using the original test plan, i was able to repro this intermittently.

1st try - all local storage cleared
2nd try - cookies cleared but not local storage. restarted again and local storage was cleared.

on master

Unfortunately #rewrite-leveldb-on-deletion did not fully fix the issue

Was able to repro this on Chrome 72 as well:

  1. enable setting to delete cookies when browser is closed
  2. Go to github.com, nytimes.com, google.com
  3. Restart
  4. Confirm localstorage/filesystem/cache entries are present in "Content settings -> Cookies -> See all cookies and site data"

Same thing happens with the rewrite-leveldb-on-deletion flag

Based on that I think https://bugs.chromium.org/p/chromium/issues/detail?id=823071 is the root cause of the issue in Brave

@diracdeltas @tomlowenthal - I'm able to repro this on Brave 0.66.101 Chromium: 75.0.3770.142 but not on Google Chrome 75.0.3770.142:

STR:

  1. Navigate to brave://settings/content/cookies, enable Keep local data only until you quit your browser
  2. Navigate to http://dustiest-limitation.000webhostapp.com/first_party.html, stores all data
  3. Navigate to http://dustiest-limitation.000webhostapp.com/view.html, you can view the data available for the site.
  4. Quit the browser
  5. Re-Open

Local Storage is available on Brave but not on Chrome.

Investigating!

Just piling on here - I am having this issue as well. I see this is on the Important Backlog (P2) project list - any update on this item? Love the work the brave team is doing!

Using: Version 1.0.1 Chromium: 78.0.3904.108 (Official Build) (64-bit)

it's just an idea, it would be possible to clean the data at startup, adding in ChromeActivity.finishNativeInitialization() something like

BrowsingDataBridge.getInstance().clearBrowsingData(
        new BrowsingDataBridge.OnClearBrowsingDataListener() {
        @Override
            public void onBrowsingDataCleared() {
            Context context = ContextUtils.getApplicationContext();
            Toast toast = Toast.makeText(context, "Data cleanup", Toast.LENGTH_SHORT);
            toast.show();
            }
        },
    new int[] {
        BrowsingDataType.HISTORY,
        BrowsingDataType.CACHE,
        BrowsingDataType.COOKIES,
        BrowsingDataType.PASSWORDS,
        BrowsingDataType.FORM_DATA,
        BrowsingDataType.SITE_SETTINGS
    }, TimePeriod.ALL_TIME);

in this way, we are sure that cookies and localStorage are deleted

This problem may be related to this as well. Sorry to say I have removed Brave release and beta versions off my main computer and switched to another Chromium based browser. For the time being, I have Brave installed on a secondary machine here.
I had so high hopes for Brave browser. Other than initial responses to my 2 month old post over at Brave community no responses from Brave personnel to my or another end user's repeated requests for updates re this issue.

You can overcome this issue by installing an extension. I use "Auto History Wipe" and that cleans out everything upon exiting Brave.

To which browser did you switch if I may ask?

The Cookie AutoDelete extension can currently delete the local storage:

https://github.com/Cookie-AutoDelete/Cookie-AutoDelete

They cite Chromium 74 as the minimum requirement for this feature (clearing the local storage) to work, perhaps an API for this was introduced in this version. If you take a closer look at the GitHub commit history of the extension, I am sure you can find the patch where this what added, it wasn't too long ago. Wouldn't it be possible for you to just replicate this?

MS Edge Chromium and Google Chrome when told to delete the "Google.com" cookie on exit of the browser does so. Next time you start up either of these browsers and go to gmail.com you have to login. With Brave if you do that you are still logged in to Gmail. Using extensions to delete cookies I have found takes the scorch earth approach resulting in the deletion of all cookies from google.com including the 2FA cookie that is set when you login and tell Gmail to trust this device for 30 days.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

simonhong picture simonhong  路  3Comments

jonathansampson picture jonathansampson  路  3Comments

Sondro picture Sondro  路  3Comments

pitsi picture pitsi  路  3Comments

lansana picture lansana  路  3Comments