Opened 21 months ago

Last modified 9 months ago

#23768 new defect

Update code to wipe indexedDB in New Identity

Reported by: arthuredelstein Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-linkability, tbb-newnym
Cc: fdsfgs@… Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by arthuredelstein)

Looks like Mozilla may have fixed the issue of wiping indexedDB.

https://bugzilla.mozilla.org/show_bug.cgi?id=1047098

Let's see if we can get this working in New Identity.

Child Tickets

Change History (9)

comment:1 Changed 21 months ago by arthuredelstein

Keywords: tbb-linkability added
Summary: Wipe indexeDB in New IdentityWipe indexedDB in New Identity

comment:2 in reply to:  description Changed 21 months ago by gk

Keywords: tbb-newnym added

Replying to arthuredelstein:

Looks like Mozilla may have fixed the issue of wiping indexedDB.

https://bugzilla.mozilla.org/show_bug.cgi?id=1405884

It seems that's not the bug number you had in mind. Which was it then?

comment:3 Changed 21 months ago by cypherpunks

Status: newneeds_information

comment:5 in reply to:  3 Changed 21 months ago by cypherpunks

Status: needs_informationnew

Replying to gk:

Replying to arthuredelstein:

Looks like Mozilla may have fixed the issue of wiping indexedDB.

https://bugzilla.mozilla.org/show_bug.cgi?id=1405884

It seems that's not the bug number you had in mind. Which was it then?

Probably, both, because tbb-linkability is for this bug number, not for this ticket.

Replying to cypherpunks:
No ni.

comment:6 in reply to:  4 Changed 21 months ago by arthuredelstein

Description: modified (diff)

Replying to gk:

I guess you meant: https://bugzilla.mozilla.org/show_bug.cgi?id=1047098.

Yeah, sorry, that's the one I meant. I am editing the description.

Last edited 21 months ago by arthuredelstein (previous) (diff)

comment:7 Changed 21 months ago by arthuredelstein

Summary: Wipe indexedDB in New IdentityUpdate code to wipe indexedDB in New Identity

I did an experiment and found that Tor Browser already wipes indexedDB on New Identity.

I think the relevant code is here:
https://gitweb.torproject.org/torbutton.git/tree/src/chrome/content/torbutton.js?id=b3ff9863db338b2bd612f109e8bbce4c4af7cbd0#n1151

  let orig_quota_test = m_tb_prefs.getBoolPref("dom.quotaManager.testing");
  try {
      // This works only by setting the pref to `true` otherwise we get an
      // exception and nothing is happening.
      m_tb_prefs.setBoolPref("dom.quotaManager.testing", true);
      Cc["@mozilla.org/dom/quota-manager-service;1"]
          .getService(Ci.nsIQuotaManagerService).clear();
  } catch(e) {
      torbutton_log(5, "Exception on storage clearing: "+e);
  } finally {
      m_tb_prefs.setBoolPref("dom.quotaManager.testing", orig_quota_test);
  }

Unfortunately, it's a little hacky because we are having to set the "dom.quotaManager.testing" pref. Maybe it would be better to adopt the code from https://hg.mozilla.org/mozilla-central/rev/0fbe00ad0203#l1.42.

comment:8 Changed 20 months ago by tokotoko

Cc: fdsfgs@… added

comment:9 in reply to:  7 Changed 9 months ago by 1-hop

tbb-torbutton, TorBrowserTeam201809

Replying to arthuredelstein:

Unfortunately, it's a little hacky because we are having to set the "dom.quotaManager.testing" pref.

And to somehow check for https://dxr.mozilla.org/mozilla-esr60/rev/dd52b41d2b775e5c7261ce52795268b7670635fc/dom/quota/ActorsParent.cpp#2712

Maybe it would be better to adopt the code from https://hg.mozilla.org/mozilla-central/rev/0fbe00ad0203#l1.42.

It is now in TB 8.0.

Note: See TracTickets for help on using tickets.