Slexy.org is shutting down and stopped accepting new Pastes on May 4th, 2021.
Existing Pastes will stop being available on or after May 10th, 2021.
Author: Not specified Language: text
Description: Bug 23044: Don't allow GIO supported protocols by default Timestamp: 2017-08-19 16:24:58 +0000
View raw paste Reply
  1.  
  2. cgit logo       index : tor-browser    
  3. The Tor Browser The Tor Project
  4. summaryrefslogtreecommitdiff   
  5. diff options
  6. context:       
  7. space: 
  8. mode:  
  9.        
  10. author  Georg Koppen <gk@torproject.org>        2017-07-27 07:31:38 +0000
  11. committer       Georg Koppen <gk@torproject.org>        2017-07-27 07:31:38 +0000
  12. commit  a96f898e0da42de751a5e1367a9899cc96fadb1f (patch)
  13. tree    b285ea86136da712bb8aff368afb55a14e699712
  14. parent  b3989f16138112084c008f89d54ecbe9cd4804d7 (diff)
  15. Bug 23044: Don't allow GIO supported protocols by default
  16. Diffstat
  17. -rw-r--r--      browser/app/profile/000-tor-browser.js  3      
  18.                
  19. -rw-r--r--      extensions/gio/nsGIOProtocolHandler.cpp 8      
  20.                
  21. 2 files changed, 7 insertions, 4 deletions
  22. diff --git a/browser/app/profile/000-tor-browser.js b/browser/app/profile/000-tor-browser.js
  23. index aaeba63..3edaad8 100644
  24. --- a/browser/app/profile/000-tor-browser.js
  25. +++ b/browser/app/profile/000-tor-browser.js
  26. @@ -210,6 +210,9 @@ pref("network.protocol-handler.warn-external.mailto", true);
  27.  pref("network.protocol-handler.warn-external.news", true);
  28.  pref("network.protocol-handler.warn-external.nntp", true);
  29.  pref("network.protocol-handler.warn-external.snews", true);
  30. +// Make sure we don't have any GIO supported protocols (defense in depth
  31. +// measure)
  32. +pref("network.gio.supported-protocols", "");
  33.  pref("plugin.disable", true); // Disable to search plugins on first start
  34.  pref("plugins.click_to_play", true);
  35.  pref("plugin.state.flash", 1);
  36. diff --git a/extensions/gio/nsGIOProtocolHandler.cpp b/extensions/gio/nsGIOProtocolHandler.cpp
  37. index a378e87..5f6b2a0 100644
  38. --- a/extensions/gio/nsGIOProtocolHandler.cpp
  39. +++ b/extensions/gio/nsGIOProtocolHandler.cpp
  40. @@ -922,16 +922,16 @@ nsGIOProtocolHandler::InitSupportedProtocolsPref(nsIPrefBranch *prefs)
  41.    // Get user preferences to determine which protocol is supported.
  42.    // Gvfs/GIO has a set of supported protocols like obex, network, archive,
  43.    // computer, dav, cdda, gphoto2, trash, etc. Some of these seems to be
  44. -  // irrelevant to process by browser. By default accept only smb and sftp
  45. -  // protocols so far.
  46. +  // irrelevant to process by browser. By default accept none.
  47.    nsresult rv = prefs->GetCharPref(MOZ_GIO_SUPPORTED_PROTOCOLS,
  48.                                     getter_Copies(mSupportedProtocols));
  49.    if (NS_SUCCEEDED(rv)) {
  50.      mSupportedProtocols.StripWhitespace();
  51.      ToLowerCase(mSupportedProtocols);
  52.    }
  53. -  else
  54. -    mSupportedProtocols.AssignLiteral("smb:,sftp:"); // use defaults
  55. +  else {
  56. +    mSupportedProtocols.AssignLiteral(""); // use none by default
  57. +  }
  58.  
  59.    LOG(("gio: supported protocols \"%s\"\n", mSupportedProtocols.get()));
  60.  }
  61. generated by cgit v1.1 at 2017-08-19 16:14:03 +0000
  62.  
  63. https://gitweb.torproject.org/tor-browser.git/commit/?id=a96f898e0da42de751a5e1367a9899cc96fadb1f
View raw paste Reply