[tbb-bugs] #19706 [Applications/Tor Browser]: GetUserDataDirectoryHome in nsXREDirProvider.cpp breaks Orfox

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Jul 18 18:55:03 UTC 2016


#19706: GetUserDataDirectoryHome in nsXREDirProvider.cpp breaks Orfox
----------------------------------------------+----------------------------
 Reporter:  amoghbl1                          |          Owner:  tbb-team
     Type:  defect                            |         Status:
 Priority:  Medium                            |  needs_revision
Component:  Applications/Tor Browser          |      Milestone:
 Severity:  Normal                            |        Version:
 Keywords:  tbb-mobile, TorBrowserTeam201607  |     Resolution:
Parent ID:                                    |  Actual Points:
 Reviewer:                                    |         Points:
                                              |        Sponsor:
----------------------------------------------+----------------------------
Changes (by mcs):

 * keywords:  tbb-mobile, TorBrowserTeam201607R => tbb-mobile,
     TorBrowserTeam201607
 * status:  needs_review => needs_revision


Comment:

 Thanks for tracking this down and for providing a patch.

 It looks like Orfox stores the browser profile data in the user's home
 directory (or wherever $HOME points to). If that is the case, then in the
 long run Orfox should be built with --enable-tor-browser-data-outside-app-
 dir (which causes TOR_BROWSER_DATA_OUTSIDE_APP_DIR to be defined; see
 #13252). Unfortunately, the code we added for #13252 has only been tested
 on OSX so you may not want to use --enable-tor-browser-data-outside-app-
 dir yet.

 Regardless of whether Orfox uses --enable-tor-browser-data-outside-app-dir
 or not, Kathy and I would like to use a revised patch that modifies
 TorBrowser_GetUserDataDir() (which is inside xpcom/io/TorFileUtils.cpp).
 We may also need to make a small patch to
 nsXREDirProvider::GetUserDataDirectoryHome() to avoid putting the data
 underneath a Data/Browser subdirectory within $HOME.

 Do you want Kathy and me to provide an untested patch for you to try, or
 do you want to create a revised patch?

 For example, if you do not build with --enable-tor-browser-data-outside-
 app-dir, you would want to insert a {{{#elif defined(ANDROID)}}} block
 before the following code in TorBrowser_GetUserDataDir():
 {{{
 #else
   // User data is embedded within the application directory (i.e.,
   // TOR_BROWSER_DATA_OUTSIDE_APP_DIR is not defined).
   nsresult rv = GetAppRootDir(aExeFile, getter_AddRefs(tbDataDir));
   NS_ENSURE_SUCCESS(rv, rv);
   rv = tbDataDir->AppendNative(NS_LITERAL_CSTRING("TorBrowser"));
   NS_ENSURE_SUCCESS(rv, rv);
 #endif
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19706#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tbb-bugs mailing list