lists.torproject.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

tbb-commits

Thread Start a new thread
Download
Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
tbb-commits@lists.torproject.org

May 2016

  • 1 participants
  • 48 discussions
[tor-browser/tor-browser-45.1.0esr-6.0-1] Bug 18885: Disable possible logging of TLS key material
by gk@torproject.org 18 May '16

18 May '16
commit f5c58c88029648b608d75cdb06d82b06f0d30953 Author: Georg Koppen <gk(a)torproject.org> Date: Tue May 17 18:30:08 2016 +0000 Bug 18885: Disable possible logging of TLS key material This is a backport of the bugfix for #1183318 (https://hg.mozilla.org/projects/nss/rev/68d0b829490f) This is working for us as we are building Tor Browser optimized for all the platforms we support. --- security/nss/lib/ssl/Makefile | 7 +++++++ security/nss/lib/ssl/ssl3con.c | 6 ++++++ security/nss/lib/ssl/sslsock.c | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/security/nss/lib/ssl/Makefile b/security/nss/lib/ssl/Makefile index d56cbf2..abf54c9 100644 --- a/security/nss/lib/ssl/Makefile +++ b/security/nss/lib/ssl/Makefile @@ -39,6 +39,13 @@ CSRCS += unix_err.c endif endif +# Enable key logging by default in debug builds, but not opt builds. +# Logging still needs to be enabled at runtime through env vars. +NSS_ALLOW_SSLKEYLOGFILE ?= $(if $(BUILD_OPT),0,1) +ifeq (1,$(NSS_ALLOW_SSLKEYLOGFILE)) +DEFINES += -DNSS_ALLOW_SSLKEYLOGFILE=1 +endif + ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # ####################################################################### diff --git a/security/nss/lib/ssl/ssl3con.c b/security/nss/lib/ssl/ssl3con.c index 8f1c547..ac57812 100644 --- a/security/nss/lib/ssl/ssl3con.c +++ b/security/nss/lib/ssl/ssl3con.c @@ -6029,6 +6029,7 @@ done: return unwrappedWrappingKey; } +#ifdef NSS_ALLOW_SSLKEYLOGFILE /* hexEncode hex encodes |length| bytes from |in| and writes it as |length*2| * bytes to |out|. */ static void @@ -6042,6 +6043,7 @@ hexEncode(char *out, const unsigned char *in, unsigned int length) *(out++) = hextable[in[i] & 15]; } } +#endif /* Called from ssl3_SendClientKeyExchange(). */ /* Presently, this always uses PKCS11. There is no bypass for this. */ @@ -6081,6 +6083,7 @@ sendRSAClientKeyExchange(sslSocket * ss, SECKEYPublicKey * svrPubKey) goto loser; } +#ifdef NSS_ALLOW_SSLKEYLOGFILE if (ssl_keylog_iob) { SECStatus extractRV = PK11_ExtractKeyValue(pms); if (extractRV == SECSuccess) { @@ -6112,6 +6115,7 @@ sendRSAClientKeyExchange(sslSocket * ss, SECKEYPublicKey * svrPubKey) } } } +#endif rv = ssl3_AppendHandshakeHeader(ss, client_key_exchange, isTLS ? enc_pms.len + 2 : enc_pms.len); @@ -10989,6 +10993,7 @@ ssl3_SendNextProto(sslSocket *ss) static void ssl3_RecordKeyLog(sslSocket *ss) { +#ifdef NSS_ALLOW_SSLKEYLOGFILE SECStatus rv; SECItem *keyData; char buf[14 /* "CLIENT_RANDOM " */ + @@ -11039,6 +11044,7 @@ ssl3_RecordKeyLog(sslSocket *ss) return; fflush(ssl_keylog_iob); return; +#endif } /* called from ssl3_SendClientSecondRound diff --git a/security/nss/lib/ssl/sslsock.c b/security/nss/lib/ssl/sslsock.c index f735009..de9a1315 100644 --- a/security/nss/lib/ssl/sslsock.c +++ b/security/nss/lib/ssl/sslsock.c @@ -118,7 +118,11 @@ int ssl_lock_readers = 1; /* default true. */ char ssl_debug; char ssl_trace; FILE * ssl_trace_iob; + +#ifdef NSS_ALLOW_SSLKEYLOGFILE FILE * ssl_keylog_iob; +#endif + char lockStatus[] = "Locks are ENABLED. "; #define LOCKSTATUS_OFFSET 10 /* offset of ENABLED */ @@ -3118,6 +3122,7 @@ ssl_SetDefaultsFromEnvironment(void) SSL_TRACE(("SSL: debugging set to %d", ssl_debug)); } #endif /* DEBUG */ +#ifdef NSS_ALLOW_SSLKEYLOGFILE ev = getenv("SSLKEYLOGFILE"); if (ev && ev[0]) { ssl_keylog_iob = fopen(ev, "a"); @@ -3131,6 +3136,7 @@ ssl_SetDefaultsFromEnvironment(void) SSL_TRACE(("SSL: logging SSL/TLS secrets to %s", ev)); } } +#endif #ifndef NO_PKCS11_BYPASS ev = getenv("SSLBYPASS"); if (ev && ev[0]) {
1 0
0 0
[tor-browser/tor-browser-45.1.0esr-6.0-1] fixup! TB4: Tor Browser's Firefox preference overrides.
by gk@torproject.org 17 May '16

17 May '16
commit 0651282ea94c4dddcec724f0ea6c21aecfd6b942 Author: Kathy Brade <brade(a)pearlcrescent.com> Date: Tue May 17 14:08:43 2016 -0400 fixup! TB4: Tor Browser's Firefox preference overrides. Set the heartbeat URL to an empty string as a defense in depth measure and disable the UITour backend (bug 19047). --- browser/app/profile/000-tor-browser.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/browser/app/profile/000-tor-browser.js b/browser/app/profile/000-tor-browser.js index 91542b7..f4f4bfe 100644 --- a/browser/app/profile/000-tor-browser.js +++ b/browser/app/profile/000-tor-browser.js @@ -78,7 +78,11 @@ pref("datareporting.healthreport.about.reportUrl", "data:text/plain,"); // Make sure Selfsupport and Unified Telemetry are really disabled, see: #18738. pref("datareporting.healthreport.about.reportUrlUnified", "data:text/plain,"); pref("browser.selfsupport.enabled", false); +pref("browser.selfsupport.url", ""); pref("toolkit.telemetry.unified", false); +// Disable the UITour backend so there is no chance that a remote page +// can use it to confuse Tor Browser users. +pref("browser.uitour.enabled", false); pref("security.mixed_content.block_active_content", false); // Disable until https://bugzilla.mozilla.org/show_bug.cgi?id=878890 is patched pref("browser.syncPromoViewsLeftMap", "{\"addons\":0, \"passwords\":0, \"bookmarks\":0}"); // Don't promote sync pref("services.sync.engine.prefs", false); // Never sync prefs, addons, or tabs with other browsers
1 0
0 0
[tor-browser-bundle/hardened-builds] Bug 19065: Don't delete Tor Browser icons
by gk@torproject.org 17 May '16

17 May '16
commit 48055f68ba9954c402760b91a5096f98d6720665 Author: Georg Koppen <gk(a)torproject.org> Date: Tue May 17 12:10:37 2016 +0000 Bug 19065: Don't delete Tor Browser icons Deleting the extracted chrome/en-US folder is good but we should not delete the whole chrome folder as it contains the Tor Browser icons. --- gitian/descriptors/linux/gitian-bundle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitian/descriptors/linux/gitian-bundle.yml b/gitian/descriptors/linux/gitian-bundle.yml index eca8d0f..3e8ae2e 100644 --- a/gitian/descriptors/linux/gitian-bundle.yml +++ b/gitian/descriptors/linux/gitian-bundle.yml @@ -187,7 +187,7 @@ script: | # For the proper search engines in our language packs unzip omni.ja chrome/en-US/locale/browser/searchplugins* mv chrome/en-US/locale/browser/searchplugins ~/build - rm -rf chrome + rm -rf chrome/en-US unzip omni.ja defaults/preferences/000-tor-browser.js cp defaults/preferences/000-tor-browser.js ~/build/ # Set the locale of the bundle.
1 0
0 0
[tor-browser-bundle/master] Bug 19065: Don't delete Tor Browser icons
by gk@torproject.org 17 May '16

17 May '16
commit 091cb50929055718277fcede5f61c61504ab8b87 Author: Georg Koppen <gk(a)torproject.org> Date: Tue May 17 12:10:37 2016 +0000 Bug 19065: Don't delete Tor Browser icons Deleting the extracted chrome/en-US folder is good but we should not delete the whole chrome folder as it contains the Tor Browser icons. --- gitian/descriptors/linux/gitian-bundle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitian/descriptors/linux/gitian-bundle.yml b/gitian/descriptors/linux/gitian-bundle.yml index 39ad811..20315ec 100644 --- a/gitian/descriptors/linux/gitian-bundle.yml +++ b/gitian/descriptors/linux/gitian-bundle.yml @@ -197,7 +197,7 @@ script: | # For the proper search engines in our language packs unzip omni.ja chrome/en-US/locale/browser/searchplugins* mv chrome/en-US/locale/browser/searchplugins ~/build - rm -rf chrome + rm -rf chrome/en-US unzip omni.ja defaults/preferences/000-tor-browser.js cp defaults/preferences/000-tor-browser.js ~/build/ # Set the locale of the bundle.
1 0
0 0
[tor-browser/tor-browser-45.1.0esr-6.0-1] Regression tests for Bug 17009: Pref to suppress some modifier key events
by gk@torproject.org 17 May '16

17 May '16
commit b815400e8aae371dcc55141d202ae96155c4c78d Author: Arthur Edelstein <arthuredelstein(a)gmail.com> Date: Wed Dec 23 09:52:05 2015 -0800 Regression tests for Bug 17009: Pref to suppress some modifier key events --- dom/tests/browser/browser.ini | 2 + dom/tests/browser/browser_tor_bug17009.html | 8 +++ dom/tests/browser/browser_tor_bug17009.js | 98 +++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+) diff --git a/dom/tests/browser/browser.ini b/dom/tests/browser/browser.ini index 363758e..bd07b47 100644 --- a/dom/tests/browser/browser.ini +++ b/dom/tests/browser/browser.ini @@ -2,6 +2,7 @@ skip-if = e10s # Bug ?????? - most of these tests fail for currently unknown reasons. support-files = browser_frame_elements.html + browser_tor_bug17009.html page_privatestorageevent.html position.html test-console-api.html @@ -44,3 +45,4 @@ disabled = re-enable when bug 794920 is fixed [browser_xhr_sandbox.js] skip-if= buildapp == 'mulet' [browser_bug1004814.js] +[browser_tor_bug17009.js] diff --git a/dom/tests/browser/browser_tor_bug17009.html b/dom/tests/browser/browser_tor_bug17009.html new file mode 100644 index 0000000..455d547 --- /dev/null +++ b/dom/tests/browser/browser_tor_bug17009.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<head> + <meta charset="utf-8"> + <title>Tor Bug 17009 tests</title> +</head> +<body> + Testing that Alt and Shift keydown/keyup events aren't detected in content. +</body> diff --git a/dom/tests/browser/browser_tor_bug17009.js b/dom/tests/browser/browser_tor_bug17009.js new file mode 100644 index 0000000..794baa4 --- /dev/null +++ b/dom/tests/browser/browser_tor_bug17009.js @@ -0,0 +1,98 @@ +"use strict"; + +/*jshint esnext:true */ + +const CONTENT_PAGE = "http://example.com/browser/dom/tests/browser/browser_tor_bug17009.html"; + +// __pushPref(key, value)__. +// Set the given pref to a value. Returns a promise +// that resolves asynchronously when the pref is +// successfully set. +let pushPref = function (key, value) { + return new Promise(resolve => { + SpecialPowers.pushPrefEnv({"set": [[key, value]]}, resolve); + }); +}; + +// __listen(target, eventType, useCapture)__. +// Returns a promise that resolves after a single event +// of eventType is received by the target. +let listen = function (target, eventType, useCapture) { + return new Promise(function (resolve, reject) { + let listenFunction = function (event) { + target.removeEventListener(eventType, listenFunction, useCapture); + resolve(event); + }; + target.addEventListener(eventType, listenFunction, useCapture); + }); +}; + +// __soon()__. +// Wait a little bit before we continue. Returns a promise. +let soon = function () { + return new Promise(resolve => executeSoon(resolve)); +}; + +// __runTests(contentWindow)__. +// The main tests. We test to make sure that, when +// "privacy.suppressModifierKeyEvents" is true, then content +// will not see Alt or Shift keydown or keyup events, +// but chrome will still see those events. +// If the pref is off, then both content and chrome +// should see all events. +let runTests = function* (contentWindow) { + // Check behavior for both non-resistance and resistance. + for (let resistFingerprinting of [false, true]) { + yield pushPref("privacy.resistFingerprinting", resistFingerprinting); + // Check behavior, both non-suppressing and suppressing. + for (let suppressModifiers of [false, true]) { + yield pushPref("privacy.suppressModifierKeyEvents", suppressModifiers); + // Check both keydown and keyup events. + for (let eventType of ["keydown", "keyup"]) { + // Check Alt and Shift keys. + for (let modifierKey of ["Alt", "Shift"]) { + // Listen for a single key event in the content window. + let contentEventPromise = listen(contentWindow, eventType, false); + // Listen for a single key event in the chrome window. + let chromeEventPromise = listen(window, eventType, false); + // Generate a Alt or Shift key event. + EventUtils.synthesizeKey("VK_" + modifierKey.toUpperCase(), + { type : eventType }, contentWindow); + // Generate a dummy "x" key event that will only be handled if + // modifier key is successfully suppressed. + EventUtils.synthesizeKey("x", { type: eventType }, contentWindow); + // Collect the events received in content and chrome. + let contentEvent = yield contentEventPromise; + let chromeEvent = yield chromeEventPromise; + // We should always see the modifier key in chrome, regardless of the + // pref state. + is(chromeEvent.key, modifierKey, + modifierKey + " key should be seen in chrome."); + // If and only if fingerprinting resistance is active and suppression + // is enabled, we should see the dummy "x" key; otherwise we expect + // to see the modifier key as usual. + let expectedContentKey = resistFingerprinting && suppressModifiers + ? "x" : modifierKey; + is(contentEvent.key, expectedContentKey, + expectedContentKey + " key should be seen in content."); + } + } + } + } +}; + +// Run tests asynchronously to make testing event handling straightforward. +add_task(function* () { + // Set up a content tab and select it. + let tab = gBrowser.addTab(CONTENT_PAGE), + browser = gBrowser.getBrowserForTab(tab); + gBrowser.selectedTab = tab; + + // Wait for tab to be completely loaded, then run the tests. + yield listen(browser, "DOMContentLoaded", false); + yield soon(); + yield runTests(gBrowser.contentWindow); + + // cleanup + gBrowser.removeTab(tab); +});
1 0
0 0
[tor-browser/tor-browser-45.1.0esr-6.0-1] Regression tests for Bug 15646: Prevent keyboard layout fingerprinting in KeyboardEvent
by gk@torproject.org 17 May '16

17 May '16
commit de5346adae7452c79820958873cf6eca473f537f Author: Arthur Edelstein <arthuredelstein(a)gmail.com> Date: Tue Dec 22 12:35:17 2015 -0800 Regression tests for Bug 15646: Prevent keyboard layout fingerprinting in KeyboardEvent --- dom/events/test/mochitest.ini | 1 + dom/events/test/test_tor_bug15646.html | 159 +++++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+) diff --git a/dom/events/test/mochitest.ini b/dom/events/test/mochitest.ini index e23b950..e7fb89c 100644 --- a/dom/events/test/mochitest.ini +++ b/dom/events/test/mochitest.ini @@ -192,3 +192,4 @@ support-files = [test_bug1013412.html] skip-if = buildapp == 'b2g' # no wheel events on b2g [test_dom_activate_event.html] +[test_tor_bug15646.html] diff --git a/dom/events/test/test_tor_bug15646.html b/dom/events/test/test_tor_bug15646.html new file mode 100644 index 0000000..463781f --- /dev/null +++ b/dom/events/test/test_tor_bug15646.html @@ -0,0 +1,159 @@ +<!DOCTYPE HTML> +<html> +<!-- +https://trac.torproject.org/15646 +--> +<head> + <title>Test for Bug 15646</title> + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> + <script type="application/javascript" src="/tests/SimpleTest/SpawnTask.js"></script> + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> +</head> +<body> +<a target="_blank" href="https://trac.torproject.org/15466">Tor Bug 15646</a> +<p id="display"></p> +<div id="content" style="display: none"> + +</div> +<pre id="test"> +</pre> +<span id="testTarget" style="border: 1px solid black;">testTarget</span> +<script type="application/javascript;version=1.7"> + SimpleTest.waitForExplicitFinish(); + let miscKeyData = [ + ["Alt", "AltLeft", 18], + ["ArrowDown", "ArrowDown", 40], + ["ArrowLeft", "ArrowLeft", 37], + ["ArrowRight", "ArrowRight", 39], + ["ArrowUp", "ArrowUp", 38], + ["Backspace", "Backspace", 8], + ["CapsLock", "CapsLock", 20], + ["ContextMenu", "ContextMenu", 93], + ["Control", "ControlLeft", 17], + ["Delete", "Delete", 46], + ["End", "End", 35], + ["Enter", "Enter", 13], + ["Escape", "Escape", 27], + ["Help", "Help", 6], + ["Home", "Home", 36], + ["Insert", "Insert", 45], + ["Meta", "OSLeft", 91], + ["PageDown", "PageDown", 34], + ["PageUp", "PageUp", 33], + ["Pause", "Pause", 19], + ["PrintScreen", "PrintScreen", 44], + ["ScrollLock", "ScrollLock", 145], + ["Shift", "ShiftLeft", 16], + ["Tab", "Tab", 9], + [" ", "Space", 32], + [",", "Comma", 188], + [".", "Period", 190], + ["/", "Slash", 191], + [";", "Semicolon", 59], + ["'", "Quote", 222], + ["[", "BracketLeft", 219], + ["]", "BracketRight", 221], + ["`", "Backquote", 192], + ["\\", "Backslash", 220], + ["-", "Minus", 173], + ["=", "Equal", 61], + ]; + let uppers = [], lowers = []; + for (let i = 65; i < 91; ++i) { + let upperChar = String.fromCharCode(i); + lowers.push([upperChar.toLowerCase(), "Key" + upperChar, i]); + uppers.push([upperChar, "Key" + upperChar, i]); + } + let fnKeys = []; + for (let i = 1; i < 25; ++i) { + let keyName = "F" + i, + keyCode = i + 111; + fnKeys.push([keyName, keyName, keyCode]); + } + let digits = []; + for (let i = 0; i < 10; ++i) { + let keyName = "" + i, + keyCode = 48 + i; + digits.push([keyName, "Digit" + keyName, keyCode]); + } + let allKeyData = miscKeyData.concat(lowers).concat(fnKeys).concat(digits); + let pushPref = function (key, value) { + return new Promise(resolve => { + SpecialPowers.pushPrefEnv({"set": [[key, value]]}, resolve); + }); + }; + let miscShiftKeyData = [ + ["!", "Digit1", 49], + ["@", "Digit2", 50], + ["#", "Digit3", 51], + ["$", "Digit4", 52], + ["%", "Digit5", 53], + ["^", "Digit6", 54], + ["&", "Digit7", 55], + ["*", "Digit8", 56], + ["(", "Digit9", 57], + [")", "Digit0", 48], + ["<", "Comma", 188], + [">", "Period", 190], + ["?", "Slash", 191], + [":", "Semicolon", 59], + ["\"", "Quote", 222], + ["{", "BracketLeft", 219], + ["}", "BracketRight", 221], + ["~", "Backquote", 192], + ["|", "Backslash", 220], + ["_", "Minus", 173], + ["+", "Equal", 61], + ]; + let allShiftKeyData = miscShiftKeyData.concat(uppers); + + // __dispatchAndListen(target, eventObject)__. + // Dispatch the given event to the target object. + // Return a promise that resolves to the event when + // that event is received by an event listener. + let dispatchAndListen = function (target, eventObject) { + let eventType = eventObject.type; + return new Promise(function (resolve, reject) { + let listenFunction = function (event) { + target.removeEventListener(eventType, listenFunction); + resolve(event); + }; + target.addEventListener(eventType, listenFunction); + target.dispatchEvent(eventObject); + }); + }; + + // Run tests asynchronously. + spawnTask(function* () { + for (let keyData of [allKeyData, allShiftKeyData]) { + for (let resistFingerprinting of [false, true]) { + let expectedShiftKey = keyData === allShiftKeyData && resistFingerprinting; + yield pushPref("privacy.resistFingerprinting", resistFingerprinting); + for (let [keyName, code, keyCode] of keyData) { + let keyboardEvent = new KeyboardEvent("keydown", { key : keyName, altKey : true, location : 2 }); + let receivedEvent = yield dispatchAndListen(document.body, keyboardEvent); + let expectedKeyCode = resistFingerprinting ? keyCode : 0; + is(receivedEvent.keyCode, expectedKeyCode, + "Event.keyCode should be " + expectedKeyCode); + is(receivedEvent.shiftKey, expectedShiftKey, + "Event.shiftKey should be " + expectedShiftKey); + if (expectedShiftKey) { + ok(!receivedEvent.altKey, + "Alt should be suppressed for fake shift keys."); + } + if (resistFingerprinting) { + let expectedCode = code; + is(receivedEvent.code, expectedCode, + "Event.code should be " + expectedCode); + ok(receivedEvent.location === 0 || receivedEvent.location === 1, + "Event.location should be 0 or 1."); + } + } + } + } + SimpleTest.finish(); + }); + +</script> +</body> +</html>
1 0
0 0
[tor-browser/tor-browser-45.1.0esr-6.0-1] Bug 18886: Hide pocket menu items when Pocket is disabled
by gk@torproject.org 17 May '16

17 May '16
commit 320de5db6d53f53aadfad785ce31826b3080e890 Author: Arthur Edelstein <arthuredelstein(a)gmail.com> Date: Fri May 13 21:42:18 2016 -0700 Bug 18886: Hide pocket menu items when Pocket is disabled If the user toggles the value of "browser.pocket.enabled", then menu items (and pocket button) will be affected only after browser restart. --- browser/base/content/browser-places.js | 9 ++++++++- browser/base/content/nsContextMenu.js | 4 +++- browser/modules/ReaderParent.jsm | 7 +++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/browser/base/content/browser-places.js b/browser/base/content/browser-places.js index 7e3ddcc..45a3af6 100644 --- a/browser/base/content/browser-places.js +++ b/browser/base/content/browser-places.js @@ -1553,7 +1553,14 @@ var BookmarkingUI = { }, updatePocketItemVisibility: function BUI_updatePocketItemVisibility(prefix) { - let hidden = !CustomizableUI.getPlacementOfWidget("pocket-button"); + // When the pocket button has been placed on the navigation bar or + // on the hamburger menu, then Pocket can be considered "active" and + // we should show the pocket menu item in various places. + // If, on the other hand, the pocket button is not present because + // the user has moved it out of the nav bar, or the browser started + // up with "browser.pocket.enabled" set to false, then we + // should not show the pocket menu items. + let hidden = document.getElementById("pocket-button") == null; document.getElementById(prefix + "pocket").hidden = hidden; document.getElementById(prefix + "pocketSeparator").hidden = hidden; }, diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js index 463809f..be42f80 100644 --- a/browser/base/content/nsContextMenu.js +++ b/browser/base/content/nsContextMenu.js @@ -225,7 +225,9 @@ nsContextMenu.prototype = { this.isContentSelected || this.onImage || this.onCanvas || this.onVideo || this.onAudio); let targetURI = (this.onSaveableLink || this.onPlainTextLink) ? this.linkURI : this.browser.currentURI; - let canPocket = CustomizableUI.getPlacementOfWidget("pocket-button") && + // Pocket is only "active" if the pocket button is present on the + // navigation bar or hamburger menu. + let canPocket = (document.getElementById("pocket-button") !== null) && window.pktApi && window.pktApi.isUserLoggedIn(); canPocket = canPocket && (targetURI.schemeIs("http") || targetURI.schemeIs("https") || (targetURI.schemeIs("about") && ReaderMode.getOriginalUrl(targetURI.spec))); diff --git a/browser/modules/ReaderParent.jsm b/browser/modules/ReaderParent.jsm index 0860989..4df8210 100644 --- a/browser/modules/ReaderParent.jsm +++ b/browser/modules/ReaderParent.jsm @@ -79,8 +79,11 @@ var ReaderParent = { break; case "Reader:PocketEnabledGet": { - let pocketPlacement = CustomizableUI.getPlacementOfWidget("pocket-button"); - let isPocketEnabled = pocketPlacement && pocketPlacement.area; + // Only when the pocket button is present on the navigation bar or + // the hamburger menu, should Pocket be considered "active". + let doc = message.target.ownerDocument; + let isPocketEnabled = (doc !== null) && + (doc.getElementById("pocket-button") !== null); message.target.messageManager.sendAsyncMessage("Reader:PocketEnabledData", { enabled: !!isPocketEnabled}); break; }
1 0
0 0
[tor-browser/tor-browser-45.1.0esr-6.0-1] Bug 18619: If indexedDB disabled, use in-memory db for asyncStorage.js
by gk@torproject.org 17 May '16

17 May '16
commit 847b5368b573508a66c7ba38a2148fe36289fe23 Author: Arthur Edelstein <arthuredelstein(a)gmail.com> Date: Mon May 16 11:00:16 2016 -0700 Bug 18619: If indexedDB disabled, use in-memory db for asyncStorage.js --- devtools/shared/async-storage.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/devtools/shared/async-storage.js b/devtools/shared/async-storage.js index 7bd05b6..4eb2889 100644 --- a/devtools/shared/async-storage.js +++ b/devtools/shared/async-storage.js @@ -42,10 +42,37 @@ const {Cc, Ci, Cu, Cr} = require("chrome"); const {indexedDB} = require("sdk/indexed-db"); const Promise = require("promise"); +const prefs = require("sdk/preferences/service"); + +// Substitute memory-only "database" when "dom.indexedDB.enabled" is false. +// Match the API and behavior of the indexedDB-based version. +const memoryDB = function () { + let dbMap = new Map(); + return { + getItem : k => { + let value = dbMap.get(k); + // Match the behavior of indexedDB-based implementation + // when an item is not present. + if (value === undefined) { + value = null; + } + return Promise.resolve(value); + }, + setItem : (k, v) => Promise.resolve(dbMap.set(k, v)), + removeItem : k => Promise.resolve(dbMap.delete(k)), + clear : () => Promise.resolve(dbMap.clear()), + length : () => Promise.resolve(dbMap.size), + key : n => Promise.resolve(Array.from(dbMap.keys())[n]) + }; +}; module.exports = (function() { "use strict"; + if (!prefs.get('dom.indexedDB.enabled', true)) { + return memoryDB(); + } + var DBNAME = "devtools-async-storage"; var DBVERSION = 1; var STORENAME = "keyvaluepairs";
1 0
0 0
[tor-browser/tor-browser-45.1.0esr-6.0-1] fixup! TB4: Tor Browser's Firefox preference overrides.
by gk@torproject.org 17 May '16

17 May '16
commit d7657bf45be5e942a6d522c118d0b2e55c483ad6 Author: Kathy Brade <brade(a)pearlcrescent.com> Date: Mon May 16 16:32:19 2016 -0400 fixup! TB4: Tor Browser's Firefox preference overrides. Disable monitoring the connected state of Tor Browser users (bug 18945). --- browser/app/profile/000-tor-browser.js | 1 + 1 file changed, 1 insertion(+) diff --git a/browser/app/profile/000-tor-browser.js b/browser/app/profile/000-tor-browser.js index bd24118..91542b7 100644 --- a/browser/app/profile/000-tor-browser.js +++ b/browser/app/profile/000-tor-browser.js @@ -230,6 +230,7 @@ pref("network.http.pipelining.read-timeout", 60000); // Hacked pref: Now means "Attempt to pipeline at least this many requests together" pref("network.http.pipelining.max-optimistic-requests", 3); pref("security.ssl.disable_session_identifiers", true); +pref("network.manage-offline-status", false); // As a "defense in depth" measure, configure an empty push server URL (the // DOM Push features are disabled by default via other prefs).
1 0
0 0
[tor-browser/tor-browser-45.1.0esr-6.0-1] Bug 1246614 - Check if system add-ons directory exists before trying to clean it. r=mossop
by gk@torproject.org 17 May '16

17 May '16
commit ecf19e655e6f6b94c311f3c69e56fea31bdb4185 Author: Frank-Rainer Grahl <frgrahl(a)gmx.net> Date: Sun Feb 21 05:45:00 2016 +0100 Bug 1246614 - Check if system add-ons directory exists before trying to clean it. r=mossop --HG-- extra : rebase_source : 44545607f4434a8ad03cdc59306e02517056d42c --- toolkit/mozapps/extensions/internal/XPIProvider.jsm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm index 94c33ea..ca51ae5 100644 --- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm @@ -8023,6 +8023,12 @@ Object.assign(SystemAddonInstallLocation.prototype, { * to cleanup again next time. */ cleanDirectories: Task.async(function*() { + + // System add-ons directory does not exist + if (!(yield OS.File.exists(this._baseDir.path))) { + return; + } + let iterator; try { iterator = new OS.File.DirectoryIterator(this._baseDir.path);
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.