Opened 4 years ago

Last modified 13 months ago

#10493 new defect

History not being deleted in TBB after disabling and enabling Private Browsing Mode

Reported by: mttp Owned by: tbb-team
Priority: High Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-torbutton, tbb-newnym
Cc: mcs, brade, gk Actual Points:
Parent ID: #20491 Points:
Reviewer: Sponsor:

Description

When using the Tor Browser Bundle with a Tor router or transparent torification, browsing history is not being deleted when you request a new identity with Torbutton or when you close the browser and start it again.

Child Tickets

Change History (18)

comment:1 Changed 4 years ago by mttp

Summary: History not being deleted when Transparent Torification is set in TBBHistory not being deleted in TBB

Not isolated to the transparent torification setting at all. After you request a new identity, you can still see all the history from your previous browsing session. I'm using the Linux 32bit TBB 3.5. Not only do the pages you last visited show up in History, you can also see the pages you recently visited in about:newtab.

comment:2 Changed 4 years ago by gk

Cc: gk added

comment:3 Changed 4 years ago by gk

Works for me. I just downloaded a 32bit en-US bundle again and after surfing a while I pressed "New Identity". History does not show any items and about:newtab is fine as well. Any idea on how to reproduce your problem?

comment:4 Changed 4 years ago by mttp

Ok, maybe transparent torification was the issue after all. Try using Tor Browser with Transparent Torification set in Torbutton's preferences. Obviously Tor Browser will not have access to Tor's control port (actually if anyone knows a way to give Tor Browser access to an external tor's control port please let me know!). But inability to select a different circuit shouldn't affect erasure of cookies and history. Using Tor Browser with a Tor router device.

Last edited 4 years ago by mttp (previous) (diff)

comment:5 Changed 4 years ago by mttp

The transparent torification setting was a red herring. The bug is that if you switch Torbutton->Cookie Protections->Protect New Cookies on and off again, it will stay in the on position for browsing history.

To reproduce this, switch that Torbutton radio button to Protect New Cookies and do some browsing. Then unprotect all your cookies, delete all your cookies, switch the radio to Do Not Protect New Cookies, and get a new identity.

Your browsing history will not be cleared, and the about:newtab page will suggest to you the most recent sites you've visited.

comment:6 Changed 4 years ago by mttp

When extensions.torbutton.cookie_auto_protect is set to true, the line

InvalidateCaches=1

is appended to Data/Browser/profile.default/compatibility.ini. When extensions.torbutton.cookie_auto_protect is set to false again, this line is not deleted.

comment:7 in reply to:  6 Changed 4 years ago by gk

Replying to mttp:

When extensions.torbutton.cookie_auto_protect is set to true, the line

InvalidateCaches=1

is appended to Data/Browser/profile.default/compatibility.ini. When extensions.torbutton.cookie_auto_protect is set to false again, this line is not deleted.

That line is always appended after the first start if I take a fresh TBB on all my Linux boxes (32 and 64 bit). Did you take a clean new bundle to test that?

comment:8 in reply to:  5 ; Changed 4 years ago by gk

Replying to mttp:

To reproduce this, switch that Torbutton radio button to Protect New Cookies and do some browsing. Then unprotect all your cookies, delete all your cookies, switch the radio to Do Not Protect New Cookies, and get a new identity.

How do you do all the cookies operations given #10353? I can't e.g. find cookies to delete easily.

Your browsing history will not be cleared, and the about:newtab page will suggest to you the most recent sites you've visited.

Following your STR (without the cookie managing parts) your problem is still not reproducible for me. What am I missing?

comment:9 in reply to:  8 ; Changed 4 years ago by mttp

Replying to gk:

Following your STR (without the cookie managing parts) your problem is still not reproducible for me. What am I missing?

Here are my modified steps to reproduce: Set cookie protections to Protect New Cookies. Disable Private Browsing Mode in Preferences. Do some browsing. Set cookie protections to Do Not Protect New Cookies. Enable Private Browsing Mode in Preferences. Get a New Identity from Torbutton. Check your history.

It turns out that this is more of an edge case than I originally thought. If someone decided this is not a bug because its so rare that both those conditions would be met, I would not be surprised. It's at least interesting though.

comment:10 in reply to:  9 Changed 4 years ago by gk

Keywords: tbb-3.5 added; TBB3.5 removed
Summary: History not being deleted in TBBHistory not being deleted in TBB after disabling and enabling Private Browsing Mode

Replying to mttp:

Replying to gk:

Following your STR (without the cookie managing parts) your problem is still not reproducible for me. What am I missing?

Here are my modified steps to reproduce: Set cookie protections to Protect New Cookies. Disable Private Browsing Mode in Preferences. Do some browsing. Set cookie protections to Do Not Protect New Cookies. Enable Private Browsing Mode in Preferences. Get a New Identity from Torbutton. Check your history.

Yes, disabling/enabling the PBM was the missing link, thanks. (I don't need the cookie managements steps)

comment:11 Changed 4 years ago by mcs

After I do the following in TBB 3.5, history is not cleared:

1) Open the Torbutton preferences and un-check "Don't record browsing history..."
2) Exit and restart the browser.
3) Visit one or more sites to generate some history.
4) Choose "New Identity" from the Torbutton menu.

Torbutton does not do everything Firefox does to clear history. See:

http://mxr.mozilla.org/mozilla-central/source/browser/base/content/sanitize.js#208

comment:12 Changed 4 years ago by mikeperry

Not clearing history if you unselect "Don't record browsing history" is not a bug. As long as we still clear all network-facing browser state, storing history (and preserving it during New Identity) in this mode is the desired behavior.

However, see also #8400 for another, possibly related issue with private browsing that may cause confusion while trying to test disk and history record behavior.

comment:13 in reply to:  12 Changed 4 years ago by mcs

Replying to mikeperry:

Not clearing history if you unselect "Don't record browsing history" is not a bug. As long as we still clear all network-facing browser state, storing history (and preserving it during New Identity) in this mode is the desired behavior.

Ahh, that makes sense.


However, see also #8400 for another, possibly related issue with private browsing that may cause confusion while trying to test disk and history record behavior.

Right, a restart is required after changing modes. And history from before private browsing mode is enabled is retained (which is somewhat confusing).

comment:14 Changed 4 years ago by mttp

The reason I thought this was related to the transparent torification option at first is that if you enable transparent torification in Torbutton, the next time you start Tor Browser, you will be asked "Do you really want to enable plugins?". Selecting yes results in all 4 of the options in Torbutton-> Preferences -> Security Settings changing their values from True to False, including the PBM option. Is this intentional? I would think "Disable browser plugins" would be the only option affected, but maybe there is a good reason for this behavior.

comment:15 in reply to:  14 Changed 4 years ago by gk

Replying to mttp:

The reason I thought this was related to the transparent torification option at first is that if you enable transparent torification in Torbutton, the next time you start Tor Browser, you will be asked "Do you really want to enable plugins?". Selecting yes results in all 4 of the options in Torbutton-> Preferences -> Security Settings changing their values from True to False, including the PBM option. Is this intentional? I would think "Disable browser plugins" would be the only option affected, but maybe there is a good reason for this behavior.

This might actually be an instance of #11763.

comment:16 Changed 3 years ago by erinn

Component: TorBrowserButtonTor Browser
Keywords: tbb-torbutton added
Owner: changed from mikeperry to tbb-team

comment:17 Changed 14 months ago by bugzilla

Keywords: tbb-3.5 removed
Parent ID: #20491
Severity: Normal

comment:18 Changed 13 months ago by gk

Keywords: tbb-newnym added
Note: See TracTickets for help on using tickets.