[tor-commits] [torbirdy/master] Fix indentation in feedwizard.js

2016-05-11 Thread sukhbir
commit 405564bc67868489607fab60c7e66beaa5f4ce00
Author: Sukhbir Singh 
Date:   Wed May 11 21:49:54 2016 -0400

Fix indentation in feedwizard.js
---
 chrome/content/feedwizard.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/chrome/content/feedwizard.js b/chrome/content/feedwizard.js
index 07b01bc..e0698a1 100644
--- a/chrome/content/feedwizard.js
+++ b/chrome/content/feedwizard.js
@@ -15,8 +15,8 @@ if (!org.torbirdy.feedwizard) org.torbirdy.feedwizard = new 
function() {
 ];
 
 for each (var [pref_template, value] in pref_spec) {
-let pref = pref_template.replace("%serverkey%", accountKey);
-Preferences.set(pref, value);
+  let pref = pref_template.replace("%serverkey%", accountKey);
+  Preferences.set(pref, value);
 }
   };
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [torbirdy/master] Add overlay to disable automatic checking and fetching of RSS feeds (#19031)

2016-05-11 Thread sukhbir
commit 0968621f307da8a9a0fcf6de9b30fb757169ccfe
Author: Sukhbir Singh 
Date:   Wed May 11 21:32:14 2016 -0400

Add overlay to disable automatic checking and fetching of RSS feeds (#19031)

To disable checking of new articles on startup and after a fixed interval 
(100
minutes as defined in FeedUtils.jsm), add an overlay which disables both 
these
settings after a new RSS account is created. This is similar to what we are
doing with the manual email configuration wizard.
---
 chrome.manifest   |  1 +
 chrome/content/feedwizard.js  | 43 +++
 chrome/content/feedwizard.xul | 10 ++
 3 files changed, 54 insertions(+)

diff --git a/chrome.manifest b/chrome.manifest
index 78f1183..431b4c9 100644
--- a/chrome.manifest
+++ b/chrome.manifest
@@ -3,6 +3,7 @@ content castironthunderbirdclub chrome/content/
 overlay chrome://messenger/content/messenger.xul 
chrome://castironthunderbirdclub/content/overlay.xul 
application={3550f703-e582-4d05-9a08-453d09bdfdc6}
 overlay chrome://messenger/content/messengercompose/messengercompose.xul 
chrome://castironthunderbirdclub/content/composeoverlay.xul
 overlay chrome://messenger/content/accountcreation/emailWizard.xul 
chrome://castironthunderbirdclub/content/emailwizard.xul
+overlay chrome://messenger-newsblog/content/feedAccountWizard.xul 
chrome://castironthunderbirdclub/content/feedwizard.xul
 
 component {ebd85413-18c8-4265-a708-a8890ec8d1ed} components/torbirdy.js
 contract @torproject.org/torbirdy;1 {ebd85413-18c8-4265-a708-a8890ec8d1ed}
diff --git a/chrome/content/feedwizard.js b/chrome/content/feedwizard.js
new file mode 100644
index 000..07b01bc
--- /dev/null
+++ b/chrome/content/feedwizard.js
@@ -0,0 +1,43 @@
+Components.utils.import("resource://gre/modules/Preferences.jsm");
+
+if (!org) var org = {};
+if (!org.torbirdy) org.torbirdy = {};
+
+if (!org.torbirdy.feedwizard) org.torbirdy.feedwizard = new function() {
+  var pub = {};
+
+  pub.fixFeedAccount = function(account) {
+let accountKey = account.incomingServer.key;
+
+let pref_spec = [
+  ['mail.server.%serverkey%.check_new_mail', false],
+  ['mail.server.%serverkey%.login_at_startup', false]
+];
+
+for each (var [pref_template, value] in pref_spec) {
+let pref = pref_template.replace("%serverkey%", accountKey);
+Preferences.set(pref, value);
+}
+  };
+
+  // From 
comm-release/mailnews/extensions/newsblog/content/feedAccountWizard.js : 
onFinish().
+  // We need to disable automatic checking of articles on startup and every X
+  // (100 is the default) minutes. Since these values are in FeedUtils.jsm, we
+  // use this overlay, create the account, and then apply our settings.
+  FeedAccountWizard.onFinish = function() {
+let account = FeedUtils.createRssAccount(this.accountName);
+if ("gFolderTreeView" in window.opener.top)
+  // Opened from 3pane File->New or Appmenu New Message, or
+  // Account Central link.
+  
window.opener.top.gFolderTreeView.selectFolder(account.incomingServer.rootMsgFolder);
+else if ("selectServer" in window.opener)
+  // Opened from Account Settings.
+  window.opener.selectServer(account.incomingServer);
+
+// Now apply the settings.
+pub.fixFeedAccount(account);
+window.close();
+  };
+
+  return pub;
+};
diff --git a/chrome/content/feedwizard.xul b/chrome/content/feedwizard.xul
new file mode 100644
index 000..2f3c935
--- /dev/null
+++ b/chrome/content/feedwizard.xul
@@ -0,0 +1,10 @@
+
+
+
+
+http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul;>
+
+  
+
+

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [torbirdy/master] Disable HTML for RSS feeds

2016-05-11 Thread sukhbir
commit 174cd106b9708d22c9825d6611b13d1f22d7397a
Author: Sukhbir Singh 
Date:   Wed May 11 15:34:48 2016 -0400

Disable HTML for RSS feeds
---
 components/torbirdy.js | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/components/torbirdy.js b/components/torbirdy.js
index 4f83513..2740c64 100644
--- a/components/torbirdy.js
+++ b/components/torbirdy.js
@@ -231,8 +231,11 @@ const TorBirdyPrefs = {
   // Force GnuPG to use SHA512.
   "extensions.enigmail.mimeHashAlgorithm": 5,
 
-  // Prefer plain text for RSS.
+  // RSS.
   "rss.display.prefer_plaintext": true,
+  // These are similar to the mailnews.* settings.
+  "rss.display.disallow_mime_handlers": 3,
+  "rss.display.html_as": 1,
 
   // Override the user agent by setting it to an empty string.
   "general.useragent.override": "",



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-browser/tor-browser-45.1.0esr-6.0-1] Bug 18995: Regression test to ensure CacheStorage is disabled in private browsing

2016-05-11 Thread gk
commit cea5f1efcd9590885127a0763432143aca01524c
Author: Arthur Edelstein 
Date:   Tue May 10 16:51:08 2016 -0700

Bug 18995: Regression test to ensure CacheStorage is disabled in private 
browsing
---
 tbb-tests/browser.ini |  5 
 tbb-tests/browser_tor_bug18995.js | 50 +++
 tbb-tests/bug18995.html   | 31 
 tbb-tests/worker_bug_18995.html   | 26 
 tbb-tests/worker_bug_18995.js |  8 +++
 5 files changed, 120 insertions(+)

diff --git a/tbb-tests/browser.ini b/tbb-tests/browser.ini
index f481660..9b6c47b 100644
--- a/tbb-tests/browser.ini
+++ b/tbb-tests/browser.ini
@@ -1,5 +1,10 @@
 [DEFAULT]
+support-files =
+  bug18995.html
+  worker_bug_18995.js
+  worker_bug_18995.html
 
+[browser_tor_bug18995.js]
 [browser_tor_bug2950.js]
 [browser_tor_omnibox.js]
 [browser_tor_TB4.js]
diff --git a/tbb-tests/browser_tor_bug18995.js 
b/tbb-tests/browser_tor_bug18995.js
new file mode 100644
index 000..1f1801b
--- /dev/null
+++ b/tbb-tests/browser_tor_bug18995.js
@@ -0,0 +1,50 @@
+// __browser_tor_bug18995.js__.
+// In this test, we open a private browsing window, and load pages
+// that test whether we can call `caches.open("test")`
+
+// Helper function.
+// Returns a promise that is fulfilled when the first event of eventype
+// arrives from 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);
+  });
+};
+
+// The main test
+add_task(function* () {
+  // First open the private browsing window
+  let privateWin = yield BrowserTestUtils.openNewBrowserWindow({private: 
true});
+  let privateBrowser = privateWin.gBrowser.selectedBrowser;
+
+  // We have two pages: (1) access CacheStorage in content page
+  //(2) access CacheStorage in worker
+  let testURIs = ["http://mochi.test:/browser/tbb-tests/bug18995.html;,
+  
"http://mochi.test:/browser/tbb-tests/worker_bug_18995.html;];
+  for (let testURI of testURIs) {
+// Load the test page
+privateBrowser.loadURI(testURI);
+// Wait for it too fully load
+yield BrowserTestUtils.browserLoaded(privateBrowser);
+// Get the  in the content page
+let resultDiv = privateBrowser.contentDocument.getElementById("result");
+// Send an event to the content page indicating we are ready to receive.
+resultDiv.dispatchEvent(new Event("ready"));
+// Wait for a signal from the content page that a result is ready.
+yield listen(resultDiv, "result", false);
+// Read the result from the result 
+let resultValue = resultDiv.innerHTML;
+// Print out the result
+info("received: " + resultValue);
+// If we are in PBM, then the promise returned by caches.open(...)
+// is supposed to arrive at a rejection with a SecurityError.
+ok(resultValue.contains("SecurityError"),
+   "CacheStorage should fail in private browsing mode");
+  }
+  // Close the browser window because we are done testing.
+  yield BrowserTestUtils.closeWindow(privateWin);
+});
diff --git a/tbb-tests/bug18995.html b/tbb-tests/bug18995.html
new file mode 100644
index 000..445a26ab
--- /dev/null
+++ b/tbb-tests/bug18995.html
@@ -0,0 +1,31 @@
+
+
+ 
+  
+  Bug 18995 test
+ 
+ 
+  
+  
+let resultDiv = document.getElementById("result");
+// Wait for a signal from chrome to start.
+resultDiv.addEventListener("ready", function () {
+  let resultEvent = new Event("result");
+  // Test caches.open(...)
+  caches.open("test1").then(function (value) {
+// We are not supposed to succeed, but if we do,
+// post the result to resultDiv.
+resultDiv.innerHTML = value.toString();
+// Notify chrome that the result is available.
+resultDiv.dispatchEvent(resultEvent);
+  }, function (reason) {
+// We should arrive here to fail. Post the result
+// to resultDiv.
+resultDiv.innerHTML = reason.toString();
+// Notify chrome that the result is available.
+resultDiv.dispatchEvent(resultEvent);
+  });
+});
+  
+ 
+
diff --git a/tbb-tests/worker_bug_18995.html b/tbb-tests/worker_bug_18995.html
new file mode 100644
index 000..d9be95c
--- /dev/null
+++ b/tbb-tests/worker_bug_18995.html
@@ -0,0 +1,26 @@
+
+
+ 
+  
+  Bug 18995 test
+ 
+ 
+  
+  
+let resultDiv = document.getElementById("result");
+// Wait for a signal from chrome to start.
+resultDiv.addEventListener("ready", function() {
+  // Run the test worker.
+  let worker = new Worker("worker_bug_18995.js");
+  // Wait for a message from the worker, which should contain
+  // the result or the error from the 

[tor-commits] [tor/master] fix 'make dist' which was broken by ticket 18365's merge

2016-05-11 Thread arma
commit 9e44273a4a22803eff900f6df10f13c7548bdb0d
Author: Roger Dingledine 
Date:   Wed May 11 16:15:37 2016 -0400

fix 'make dist' which was broken by ticket 18365's merge
---
 src/ext/include.am | 32 
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/ext/include.am b/src/ext/include.am
index d1a3b47..708f550 100644
--- a/src/ext/include.am
+++ b/src/ext/include.am
@@ -153,20 +153,20 @@ LIBKECCAK_TINY=src/ext/keccak-tiny/libkeccak-tiny.a
 noinst_LIBRARIES += $(LIBKECCAK_TINY)
 
 EXTRA_DIST += \
-   timeouts/bench/bench-add.lua\
-   timeouts/bench/bench-aux.lua\
-   timeouts/bench/bench.c  \
-   timeouts/bench/bench-del.lua\
-   timeouts/bench/bench-expire.lua \
-   timeouts/bench/bench.h  \
-   timeouts/bench/bench-heap.c \
-   timeouts/bench/bench-llrb.c \
-   timeouts/bench/bench.plt\
-   timeouts/bench/bench-wheel.c\
-   timeouts/bench/Rules.mk \
-   timeouts/lua/Rules.mk   \
-   timeouts/lua/timeout-lua.c  \
-   timeouts/Makefile   \
-   timeouts/Rules.shrc \
-   timeouts/test-timeout.c
+   src/ext/timeouts/bench/bench-add.lua\
+   src/ext/timeouts/bench/bench-aux.lua\
+   src/ext/timeouts/bench/bench.c  \
+   src/ext/timeouts/bench/bench-del.lua\
+   src/ext/timeouts/bench/bench-expire.lua \
+   src/ext/timeouts/bench/bench.h  \
+   src/ext/timeouts/bench/bench-heap.c \
+   src/ext/timeouts/bench/bench-llrb.c \
+   src/ext/timeouts/bench/bench.plt\
+   src/ext/timeouts/bench/bench-wheel.c\
+   src/ext/timeouts/bench/Rules.mk \
+   src/ext/timeouts/lua/Rules.mk   \
+   src/ext/timeouts/lua/timeout-lua.c  \
+   src/ext/timeouts/Makefile   \
+   src/ext/timeouts/Rules.shrc \
+   src/ext/timeouts/test-timeout.c
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-browser-bundle/hardened-builds] Bug 18915: Use our search plugins in localized builds

2016-05-11 Thread gk
commit 467796a7b7901fc22f26716860ed6ed8d4102416
Author: Georg Koppen 
Date:   Wed May 11 19:37:29 2016 +

Bug 18915: Use our search plugins in localized builds

We are preparing the language packs we ship for using our
search engines in the order we want. This is necessary due
to https://bugzilla.mozilla.org/show_bug.cgi?id=1162569.
---
 gitian/descriptors/linux/gitian-bundle.yml   | 19 +
 gitian/descriptors/mac/gitian-bundle.yml | 19 +
 gitian/descriptors/windows/gitian-bundle.yml | 40 +---
 3 files changed, 68 insertions(+), 10 deletions(-)

diff --git a/gitian/descriptors/linux/gitian-bundle.yml 
b/gitian/descriptors/linux/gitian-bundle.yml
index b9bf0f9..eca8d0f 100644
--- a/gitian/descriptors/linux/gitian-bundle.yml
+++ b/gitian/descriptors/linux/gitian-bundle.yml
@@ -184,6 +184,10 @@ script: |
   cp -a ${TB_STAGE_DIR} ${PKG_DIR}
   #
   pushd ${PKG_DIR}/Browser/browser/
+  # 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
   unzip omni.ja defaults/preferences/000-tor-browser.js
   cp defaults/preferences/000-tor-browser.js ~/build/
   # Set the locale of the bundle.
@@ -194,6 +198,21 @@ script: |
   #
   unzip linux-langpacks.zip
   LINUX_LOCALES="$BUNDLE_LOCALES $BUNDLE_LOCALES_LINUX"
+  # Prepare our language packs for using the proper search engines. See bug
+  # 18915 for more details.
+  for LANG in $LINUX_LOCALES
+  do
+xpi=linux-langpacks/$LANG.xpi
+unzip -d prep_$LANG $xpi
+search_plugins_path=prep_$LANG/browser/chrome/$LANG/locale/browser
+rm -rf $search_plugins_path/searchplugins
+cp -rf ~/build/searchplugins $search_plugins_path
+rm $xpi
+cd prep_$LANG
+zip -r9 ../$xpi *
+cd ..
+rm -rf prep_$LANG
+  done
   # If we are building a multi-lingual package, add all of the language packs.
   if [ "z$MULTI_LINGUAL" = "z1" ]; then
 pushd linux-langpacks
diff --git a/gitian/descriptors/mac/gitian-bundle.yml 
b/gitian/descriptors/mac/gitian-bundle.yml
index 0199cca..e046b57 100644
--- a/gitian/descriptors/mac/gitian-bundle.yml
+++ b/gitian/descriptors/mac/gitian-bundle.yml
@@ -184,6 +184,10 @@ script: |
   cd ..
   #
   pushd $TORBROWSER_NAME.app/Contents/Resources/browser/
+  # 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
   unzip omni.ja defaults/preferences/000-tor-browser.js
   cp defaults/preferences/000-tor-browser.js ~/build/
   # Set the locale of the bundle.
@@ -203,6 +207,21 @@ script: |
 
   unzip mac-langpacks.zip
   MAC_LOCALES="$BUNDLE_LOCALES $BUNDLE_LOCALES_MAC"
+  # Prepare our language packs for using the proper search engines. See bug
+  # 18915 for more details.
+  for LANG in $MAC_LOCALES
+  do
+xpi=mac-langpacks/$LANG.xpi
+unzip -d prep_$LANG $xpi
+search_plugins_path=prep_$LANG/browser/chrome/$LANG/locale/browser
+rm -rf $search_plugins_path/searchplugins
+cp -rf ~/build/searchplugins $search_plugins_path
+rm $xpi
+cd prep_$LANG
+zip -r9 ../$xpi *
+cd ..
+rm -rf prep_$LANG
+  done
   PKG_LOCALE="en-US"
   # If we are building a multi-lingual package, add all of the language packs
   # and use "ALL" in the package name and as the locale for update purposes.
diff --git a/gitian/descriptors/windows/gitian-bundle.yml 
b/gitian/descriptors/windows/gitian-bundle.yml
index 51565bf..5473bf3 100644
--- a/gitian/descriptors/windows/gitian-bundle.yml
+++ b/gitian/descriptors/windows/gitian-bundle.yml
@@ -152,8 +152,38 @@ script: |
   cp ../versions "Tor Browser"/Browser/TorBrowser/Docs/sources/
   cp ../bundle.inputs "Tor Browser"/Browser/TorBrowser/Docs/sources/
 
+  #
+  pushd "Tor Browser"/Browser/browser/
+  # 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
+  unzip omni.ja defaults/preferences/000-tor-browser.js
+  cp defaults/preferences/000-tor-browser.js ~/build/
+  # Set the locale bundle.
+  echo "pref(\"general.useragent.locale\", \"en-US\");" >> 
defaults/preferences/000-tor-browser.js
+  zip -Xm omni.ja defaults/preferences/000-tor-browser.js
+  rm -rf defaults
+  popd
+  #
+
   unzip ../win32-langpacks.zip
   WIN32_LOCALES="$BUNDLE_LOCALES $BUNDLE_LOCALES_WIN32"
+  # Prepare our language packs for using the proper search engines. See bug
+  # 18915 for more details.
+  for LANG in $WIN32_LOCALES
+  do
+xpi=win32-langpacks/$LANG.xpi
+unzip -d prep_$LANG $xpi
+search_plugins_path=prep_$LANG/browser/chrome/$LANG/locale/browser
+rm -rf $search_plugins_path/searchplugins
+cp -rf ~/build/searchplugins $search_plugins_path
+rm $xpi
+cd prep_$LANG
+zip -r9 ../$xpi *

[tor-commits] [tor-browser-bundle/master] Bug 18915: Use our search plugins in localized builds

2016-05-11 Thread gk
commit 94c6a1c73291f8f456249d9719de57ff002fe6fe
Author: Georg Koppen 
Date:   Wed May 11 19:37:29 2016 +

Bug 18915: Use our search plugins in localized builds

We are preparing the language packs we ship for using our
search engines in the order we want. This is necessary due
to https://bugzilla.mozilla.org/show_bug.cgi?id=1162569.
---
 gitian/descriptors/linux/gitian-bundle.yml   | 19 +
 gitian/descriptors/mac/gitian-bundle.yml | 19 +
 gitian/descriptors/windows/gitian-bundle.yml | 40 +---
 3 files changed, 68 insertions(+), 10 deletions(-)

diff --git a/gitian/descriptors/linux/gitian-bundle.yml 
b/gitian/descriptors/linux/gitian-bundle.yml
index d5aaec4..39ad811 100644
--- a/gitian/descriptors/linux/gitian-bundle.yml
+++ b/gitian/descriptors/linux/gitian-bundle.yml
@@ -194,6 +194,10 @@ script: |
   cp -a ${TB_STAGE_DIR} ${PKG_DIR}
   #
   pushd ${PKG_DIR}/Browser/browser/
+  # 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
   unzip omni.ja defaults/preferences/000-tor-browser.js
   cp defaults/preferences/000-tor-browser.js ~/build/
   # Set the locale of the bundle.
@@ -204,6 +208,21 @@ script: |
   #
   unzip linux-langpacks.zip
   LINUX_LOCALES="$BUNDLE_LOCALES $BUNDLE_LOCALES_LINUX"
+  # Prepare our language packs for using the proper search engines. See bug
+  # 18915 for more details.
+  for LANG in $LINUX_LOCALES
+  do
+xpi=linux-langpacks/$LANG.xpi
+unzip -d prep_$LANG $xpi
+search_plugins_path=prep_$LANG/browser/chrome/$LANG/locale/browser
+rm -rf $search_plugins_path/searchplugins
+cp -rf ~/build/searchplugins $search_plugins_path
+rm $xpi
+cd prep_$LANG
+zip -r9 ../$xpi *
+cd ..
+rm -rf prep_$LANG
+  done
   # If we are building a multi-lingual package, add all of the language packs.
   if [ "z$MULTI_LINGUAL" = "z1" ]; then
 pushd linux-langpacks
diff --git a/gitian/descriptors/mac/gitian-bundle.yml 
b/gitian/descriptors/mac/gitian-bundle.yml
index 00cd4d1..ff17520 100644
--- a/gitian/descriptors/mac/gitian-bundle.yml
+++ b/gitian/descriptors/mac/gitian-bundle.yml
@@ -213,6 +213,10 @@ script: |
   cd ..
   #
   pushd $TORBROWSER_NAME.app/Contents/Resources/browser/
+  # 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
   unzip omni.ja defaults/preferences/000-tor-browser.js
   cp defaults/preferences/000-tor-browser.js ~/build/
   if [ "z$DATA_OUTSIDE_APP_DIR" = "z1" ]; then
@@ -245,6 +249,21 @@ script: |
 
   unzip mac-langpacks.zip
   MAC_LOCALES="$BUNDLE_LOCALES $BUNDLE_LOCALES_MAC"
+  # Prepare our language packs for using the proper search engines. See bug
+  # 18915 for more details.
+  for LANG in $MAC_LOCALES
+  do
+xpi=mac-langpacks/$LANG.xpi
+unzip -d prep_$LANG $xpi
+search_plugins_path=prep_$LANG/browser/chrome/$LANG/locale/browser
+rm -rf $search_plugins_path/searchplugins
+cp -rf ~/build/searchplugins $search_plugins_path
+rm $xpi
+cd prep_$LANG
+zip -r9 ../$xpi *
+cd ..
+rm -rf prep_$LANG
+  done
   PKG_LOCALE="en-US"
   # If we are building a multi-lingual package, add all of the language packs
   # and use "ALL" in the package name and as the locale for update purposes.
diff --git a/gitian/descriptors/windows/gitian-bundle.yml 
b/gitian/descriptors/windows/gitian-bundle.yml
index 4fe4bb6..da65142 100644
--- a/gitian/descriptors/windows/gitian-bundle.yml
+++ b/gitian/descriptors/windows/gitian-bundle.yml
@@ -161,8 +161,38 @@ script: |
   cp ../versions "Tor Browser"/Browser/TorBrowser/Docs/sources/
   cp ../bundle.inputs "Tor Browser"/Browser/TorBrowser/Docs/sources/
 
+  #
+  pushd "Tor Browser"/Browser/browser/
+  # 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
+  unzip omni.ja defaults/preferences/000-tor-browser.js
+  cp defaults/preferences/000-tor-browser.js ~/build/
+  # Set the locale bundle.
+  echo "pref(\"general.useragent.locale\", \"en-US\");" >> 
defaults/preferences/000-tor-browser.js
+  zip -Xm omni.ja defaults/preferences/000-tor-browser.js
+  rm -rf defaults
+  popd
+  #
+
   unzip ../win32-langpacks.zip
   WIN32_LOCALES="$BUNDLE_LOCALES $BUNDLE_LOCALES_WIN32"
+  # Prepare our language packs for using the proper search engines. See bug
+  # 18915 for more details.
+  for LANG in $WIN32_LOCALES
+  do
+xpi=win32-langpacks/$LANG.xpi
+unzip -d prep_$LANG $xpi
+search_plugins_path=prep_$LANG/browser/chrome/$LANG/locale/browser
+rm -rf $search_plugins_path/searchplugins
+cp -rf ~/build/searchplugins $search_plugins_path
+rm $xpi
+cd prep_$LANG
+zip 

[tor-commits] [tor-browser-bundle/hardened-builds] Bug 18976: Remove some FTE bridges

2016-05-11 Thread gk
commit 076028da65ee8d4785b65f818e7f8c19bf9e3f0b
Author: Georg Koppen 
Date:   Mon May 9 07:53:06 2016 +

Bug 18976: Remove some FTE bridges
---
 Bundle-Data/PTConfigs/bridge_prefs.js | 13 -
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/Bundle-Data/PTConfigs/bridge_prefs.js 
b/Bundle-Data/PTConfigs/bridge_prefs.js
index 390d7a5..379f256 100644
--- a/Bundle-Data/PTConfigs/bridge_prefs.js
+++ b/Bundle-Data/PTConfigs/bridge_prefs.js
@@ -8,15 +8,10 @@ pref("extensions.torlauncher.default_bridge.obfs3.3", "obfs3 
169.229.59.75:46328
 pref("extensions.torlauncher.default_bridge.obfs3.4", "obfs3 
109.105.109.163:38980 1E05F577A0EC0213F971D81BF4D86A9E4E8229ED");
 pref("extensions.torlauncher.default_bridge.obfs3.5", "obfs3 
109.105.109.163:47779 4C331FA9B3D1D6D8FB0D8FBBF0C259C360D97E6A");
 
-pref("extensions.torlauncher.default_bridge.fte.1", "fte 192.240.101.106:80 
FDC5BA65D93B6BCA5EBDF8EF8E4FA936B7F1F8E5");
-pref("extensions.torlauncher.default_bridge.fte.2", "fte 50.7.176.114:80 
2BD466989944867075E872310EBAD65BC88C8AEF");
-pref("extensions.torlauncher.default_bridge.fte.3", "fte 131.252.210.150:8080 
0E858AC201BF0F3FA3C462F64844CBFFC7297A42");
-pref("extensions.torlauncher.default_bridge.fte.4", "fte 128.105.214.161:8080 
1E326AAFB3FCB515015250D8FCCC8E37F91A153B");
-pref("extensions.torlauncher.default_bridge.fte.5", "fte 128.105.214.162:8080 
FC562097E1951DCC41B7D7F324D88157119BB56D");
-pref("extensions.torlauncher.default_bridge.fte.6", "fte 128.105.214.163:8080 
A17A40775FBD2CA1184BF80BFC330A77ECF9D0E9");
-
-pref("extensions.torlauncher.default_bridge.fte-ipv6.1", "fte 
[2001:49f0:d002:1::2]:80 FDC5BA65D93B6BCA5EBDF8EF8E4FA936B7F1F8E5");
-pref("extensions.torlauncher.default_bridge.fte-ipv6.2", "fte 
[2001:49f0:d00a:1::c]:80 2BD466989944867075E872310EBAD65BC88C8AEF");
+pref("extensions.torlauncher.default_bridge.fte.1", "fte 131.252.210.150:8080 
0E858AC201BF0F3FA3C462F64844CBFFC7297A42");
+pref("extensions.torlauncher.default_bridge.fte.2", "fte 128.105.214.161:8080 
1E326AAFB3FCB515015250D8FCCC8E37F91A153B");
+pref("extensions.torlauncher.default_bridge.fte.3", "fte 128.105.214.162:8080 
FC562097E1951DCC41B7D7F324D88157119BB56D");
+pref("extensions.torlauncher.default_bridge.fte.4", "fte 128.105.214.163:8080 
A17A40775FBD2CA1184BF80BFC330A77ECF9D0E9");
 
 pref("extensions.torlauncher.default_bridge.scramblesuit.1", "scramblesuit 
83.212.101.3:443 A09D536DD1752D542E1FBB3C9CE4449D51298239 
password=XTCXLG2JAMJKZW2POLBAOWOQETQSMASH");
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-browser-bundle/master] Bug 18976: Remove some FTE bridges

2016-05-11 Thread gk
commit bd2d6d501e88599a86b7a55a23f1731c0ec6ed74
Author: Georg Koppen 
Date:   Mon May 9 07:53:06 2016 +

Bug 18976: Remove some FTE bridges
---
 Bundle-Data/PTConfigs/bridge_prefs.js | 13 -
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/Bundle-Data/PTConfigs/bridge_prefs.js 
b/Bundle-Data/PTConfigs/bridge_prefs.js
index 390d7a5..379f256 100644
--- a/Bundle-Data/PTConfigs/bridge_prefs.js
+++ b/Bundle-Data/PTConfigs/bridge_prefs.js
@@ -8,15 +8,10 @@ pref("extensions.torlauncher.default_bridge.obfs3.3", "obfs3 
169.229.59.75:46328
 pref("extensions.torlauncher.default_bridge.obfs3.4", "obfs3 
109.105.109.163:38980 1E05F577A0EC0213F971D81BF4D86A9E4E8229ED");
 pref("extensions.torlauncher.default_bridge.obfs3.5", "obfs3 
109.105.109.163:47779 4C331FA9B3D1D6D8FB0D8FBBF0C259C360D97E6A");
 
-pref("extensions.torlauncher.default_bridge.fte.1", "fte 192.240.101.106:80 
FDC5BA65D93B6BCA5EBDF8EF8E4FA936B7F1F8E5");
-pref("extensions.torlauncher.default_bridge.fte.2", "fte 50.7.176.114:80 
2BD466989944867075E872310EBAD65BC88C8AEF");
-pref("extensions.torlauncher.default_bridge.fte.3", "fte 131.252.210.150:8080 
0E858AC201BF0F3FA3C462F64844CBFFC7297A42");
-pref("extensions.torlauncher.default_bridge.fte.4", "fte 128.105.214.161:8080 
1E326AAFB3FCB515015250D8FCCC8E37F91A153B");
-pref("extensions.torlauncher.default_bridge.fte.5", "fte 128.105.214.162:8080 
FC562097E1951DCC41B7D7F324D88157119BB56D");
-pref("extensions.torlauncher.default_bridge.fte.6", "fte 128.105.214.163:8080 
A17A40775FBD2CA1184BF80BFC330A77ECF9D0E9");
-
-pref("extensions.torlauncher.default_bridge.fte-ipv6.1", "fte 
[2001:49f0:d002:1::2]:80 FDC5BA65D93B6BCA5EBDF8EF8E4FA936B7F1F8E5");
-pref("extensions.torlauncher.default_bridge.fte-ipv6.2", "fte 
[2001:49f0:d00a:1::c]:80 2BD466989944867075E872310EBAD65BC88C8AEF");
+pref("extensions.torlauncher.default_bridge.fte.1", "fte 131.252.210.150:8080 
0E858AC201BF0F3FA3C462F64844CBFFC7297A42");
+pref("extensions.torlauncher.default_bridge.fte.2", "fte 128.105.214.161:8080 
1E326AAFB3FCB515015250D8FCCC8E37F91A153B");
+pref("extensions.torlauncher.default_bridge.fte.3", "fte 128.105.214.162:8080 
FC562097E1951DCC41B7D7F324D88157119BB56D");
+pref("extensions.torlauncher.default_bridge.fte.4", "fte 128.105.214.163:8080 
A17A40775FBD2CA1184BF80BFC330A77ECF9D0E9");
 
 pref("extensions.torlauncher.default_bridge.scramblesuit.1", "scramblesuit 
83.212.101.3:443 A09D536DD1752D542E1FBB3C9CE4449D51298239 
password=XTCXLG2JAMJKZW2POLBAOWOQETQSMASH");
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [torspec/master] Merge remote-tracking branch 'public/bug18815'

2016-05-11 Thread nickm
commit 0c5563ae78fef607d4759435c7610806d5d241ad
Merge: 3a12deb 5c17e94
Author: Nick Mathewson 
Date:   Wed May 11 14:13:34 2016 -0400

Merge remote-tracking branch 'public/bug18815'

 dir-spec.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [torspec/master] Note #18815 change of UseOptimisticData default.

2016-05-11 Thread nickm
commit 5c17e945cde5fdc51570ce5b0f9843b1db3246be
Author: Nick Mathewson 
Date:   Mon Apr 18 13:56:27 2016 -0400

Note #18815 change of UseOptimisticData default.
---
 dir-spec.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dir-spec.txt b/dir-spec.txt
index 1019b24..c1bb2d4 100644
--- a/dir-spec.txt
+++ b/dir-spec.txt
@@ -1721,8 +1721,9 @@
 "UseOptimisticData" -- If set to zero, clients by default
 shouldn't try to send optimistic data to servers until they have
 received a RELAY_CONNECTED cell.
-Min: 0, Max: 1, Default: 0
+Min: 0, Max: 1, Default: 1
 First-appeared: 0.2.3.3-alpha
+Default was 0 before: 0.2.9.1-alpha
 
 "maxunmeasuredbw" -- Used by authorities during voting with
 method 17 or later. The maximum value to give for any Bandwidth=



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge remote-tracking branch 'public/bug18815'

2016-05-11 Thread nickm
commit e3a4511049162b2560b80a70c6c2596fcb34dd34
Merge: 48b7db3 4f37919
Author: Nick Mathewson 
Date:   Wed May 11 14:12:39 2016 -0400

Merge remote-tracking branch 'public/bug18815'

 changes/bug18815| 3 +++
 src/or/circuituse.c | 7 ---
 2 files changed, 7 insertions(+), 3 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Change UseOptimisticData default to 1.

2016-05-11 Thread nickm
commit 4f37919fa1fd66daf2913203af3f51be60771fcb
Author: Nick Mathewson 
Date:   Mon Apr 18 13:55:23 2016 -0400

Change UseOptimisticData default to 1.

This lets us use optimistic data for downloading our initial
consensus.

Closes ticket 18815.
---
 changes/bug18815| 3 +++
 src/or/circuituse.c | 7 ---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/changes/bug18815 b/changes/bug18815
new file mode 100644
index 000..cb504b2
--- /dev/null
+++ b/changes/bug18815
@@ -0,0 +1,3 @@
+  o Minor features (performance):
+- When fetching a consensus for the first time, use optimistic data.
+  This saves a round-trip during startup. Closes ticket 18815.
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 31003ea..e4eef2c 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -2141,10 +2141,11 @@ optimistic_data_enabled(void)
 {
   const or_options_t *options = get_options();
   if (options->OptimisticData < 0) {
-/* XXX023 consider having auto default to 1 rather than 0 before
- * the 0.2.3 branch goes stable. See bug 3617. -RD */
+/* Note: this default was 0 before #18815 was merged. We can't take the
+ * parameter out of the consensus until versions before that are all
+ * obsolete. */
 const int32_t enabled =
-  networkstatus_get_param(NULL, "UseOptimisticData", 0, 0, 1);
+  networkstatus_get_param(NULL, "UseOptimisticData", /*default*/ 1, 0, 1);
 return (int)enabled;
   }
   return options->OptimisticData;



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-launcher-progress] Update translations for tor-launcher-progress

2016-05-11 Thread translation
commit 79e21c585e1de2a5cd07268d7eb382d42f523b1d
Author: Translation commit bot 
Date:   Wed May 11 17:45:39 2016 +

Update translations for tor-launcher-progress
---
 br/progress.dtd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/br/progress.dtd b/br/progress.dtd
index 9ac9ad7..b5790df 100644
--- a/br/progress.dtd
+++ b/br/progress.dtd
@@ -1,4 +1,4 @@
-
+
 
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/torbutton-brandproperties] Update translations for torbutton-brandproperties

2016-05-11 Thread translation
commit 17515029ad0a65252cc323752f84f2b39d329d40
Author: Translation commit bot 
Date:   Wed May 11 17:45:54 2016 +

Update translations for torbutton-brandproperties
---
 br/brand.properties | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/br/brand.properties b/br/brand.properties
index 732c157..5dbba40 100644
--- a/br/brand.properties
+++ b/br/brand.properties
@@ -2,9 +2,9 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-brandShorterName=Tor Browser
-brandShortName=Tor Browser
-brandFullName=Tor Browser
+brandShorterName=Keflusker enklask Tor
+brandShortName=Keflusker enklask Tor
+brandFullName=Keflusker enklask Tor
 vendorShortName=Tor Project
 
 homePageSingleStartMain=Firefox Start, a fast home page with built-in search

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-onioncircuits_completed] Update translations for tails-onioncircuits_completed

2016-05-11 Thread translation
commit 17b1c481c4a3e7c98a4ac4e160b3cca726d536fd
Author: Translation commit bot 
Date:   Wed May 11 17:47:03 2016 +

Update translations for tails-onioncircuits_completed
---
 hu/onioncircuits.pot | 94 
 1 file changed, 94 insertions(+)

diff --git a/hu/onioncircuits.pot b/hu/onioncircuits.pot
new file mode 100644
index 000..7554a5d
--- /dev/null
+++ b/hu/onioncircuits.pot
@@ -0,0 +1,94 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# benewfy , 2016
+# Falu, 2016
+# Falu, 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: The Tor Project\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-03-31 21:31+0200\n"
+"PO-Revision-Date: 2016-05-11 17:22+\n"
+"Last-Translator: Falu\n"
+"Language-Team: Hungarian 
(http://www.transifex.com/otf/torproject/language/hu/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: hu\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../onioncircuits:81
+msgid ""
+"Cannot connect to the Tor daemon. Onion Circuits will try to reconnect..."
+msgstr "Nem sikerült csatlakozni a Tor démonhoz. Az Onion Áramkörök 
megpróbál újracsatlakozni..."
+
+#: ../onioncircuits:94
+msgid "Onion Circuits"
+msgstr "Onion Áramkörök"
+
+#: ../onioncircuits:95
+msgid "Display Tor circuits and streams"
+msgstr "Tor áramkörök és folyamok"
+
+#: ../onioncircuits:107
+msgid "OK"
+msgstr "OK"
+
+#: ../onioncircuits:124
+msgid "Path"
+msgstr "Útvonal"
+
+#: ../onioncircuits:125
+msgid "Status"
+msgstr "Állapot"
+
+#: ../onioncircuits:141
+msgid "Click on a path to get details"
+msgstr "A részletekhez kattints az útvonalra"
+
+#: ../onioncircuits:215
+msgid ""
+"Lost connection to the Tor daemon. Onion Circuits will try to reconnect..."
+msgstr "Elveszett Tor démon kapcsolata. Az Onion Áramkörök megpróbál 
újracsatlakozni..."
+
+#: ../onioncircuits:232
+msgid "Connected to the Tor daemon! You can use now Onion Circuits."
+msgstr "Kapcsolódva a Tor démonhoz! Most már használható az Onion 
Áramkörök."
+
+#: ../onioncircuits:314
+msgid "Building..."
+msgstr "Felépítés..."
+
+#: ../onioncircuits:339
+#, c-format
+msgid "%s: %s"
+msgstr "%s: %s"
+
+#: ../onioncircuits:564
+msgid "Fingerprint:"
+msgstr "Ujjlenyomat:"
+
+#: ../onioncircuits:565
+msgid "Published:"
+msgstr "Közzétéve:"
+
+#: ../onioncircuits:566
+msgid "IP:"
+msgstr "IP:"
+
+#: ../onioncircuits:566
+#, c-format
+msgid "%s (%s)"
+msgstr "%s (%s)"
+
+#: ../onioncircuits:567
+msgid "Bandwidth:"
+msgstr "Sávszélesség:"
+
+#: ../onioncircuits:567
+#, c-format
+msgid "%.2f Mb/s"
+msgstr "%.2f Mb/s"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-onioncircuits] Update translations for tails-onioncircuits

2016-05-11 Thread translation
commit 13c007d1752cb10c944935d4081f3b19e48fc29c
Author: Translation commit bot 
Date:   Wed May 11 17:47:00 2016 +

Update translations for tails-onioncircuits
---
 hu/onioncircuits.pot | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/hu/onioncircuits.pot b/hu/onioncircuits.pot
index ac5fd4d..7554a5d 100644
--- a/hu/onioncircuits.pot
+++ b/hu/onioncircuits.pot
@@ -4,14 +4,15 @@
 # 
 # Translators:
 # benewfy , 2016
-# Faludi Zoltán, 2016
+# Falu, 2016
+# Falu, 2016
 msgid ""
 msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2016-03-31 21:31+0200\n"
-"PO-Revision-Date: 2016-04-19 18:55+\n"
-"Last-Translator: Faludi Zoltán\n"
+"PO-Revision-Date: 2016-05-11 17:22+\n"
+"Last-Translator: Falu\n"
 "Language-Team: Hungarian 
(http://www.transifex.com/otf/torproject/language/hu/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -22,15 +23,15 @@ msgstr ""
 #: ../onioncircuits:81
 msgid ""
 "Cannot connect to the Tor daemon. Onion Circuits will try to reconnect..."
-msgstr ""
+msgstr "Nem sikerült csatlakozni a Tor démonhoz. Az Onion Áramkörök 
megpróbál újracsatlakozni..."
 
 #: ../onioncircuits:94
 msgid "Onion Circuits"
-msgstr ""
+msgstr "Onion Áramkörök"
 
 #: ../onioncircuits:95
 msgid "Display Tor circuits and streams"
-msgstr ""
+msgstr "Tor áramkörök és folyamok"
 
 #: ../onioncircuits:107
 msgid "OK"
@@ -51,15 +52,15 @@ msgstr "A részletekhez kattints az útvonalra"
 #: ../onioncircuits:215
 msgid ""
 "Lost connection to the Tor daemon. Onion Circuits will try to reconnect..."
-msgstr ""
+msgstr "Elveszett Tor démon kapcsolata. Az Onion Áramkörök megpróbál 
újracsatlakozni..."
 
 #: ../onioncircuits:232
 msgid "Connected to the Tor daemon! You can use now Onion Circuits."
-msgstr ""
+msgstr "Kapcsolódva a Tor démonhoz! Most már használható az Onion 
Áramkörök."
 
 #: ../onioncircuits:314
 msgid "Building..."
-msgstr ""
+msgstr "Felépítés..."
 
 #: ../onioncircuits:339
 #, c-format

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/torbutton-branddtd] Update translations for torbutton-branddtd

2016-05-11 Thread translation
commit c867f1c93c6ff671aa7c5c6cfc952f9c122bdb49
Author: Translation commit bot 
Date:   Wed May 11 17:45:59 2016 +

Update translations for torbutton-branddtd
---
 br/brand.dtd | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/br/brand.dtd b/br/brand.dtd
index 3df1a08..e05aa92 100644
--- a/br/brand.dtd
+++ b/br/brand.dtd
@@ -2,9 +2,9 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
-
-
-
+
+
+
 
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/abouttor-homepage] Update translations for abouttor-homepage

2016-05-11 Thread translation
commit b8e446ceef0c203ca13320d0cea1d2c1fe6c935a
Author: Translation commit bot 
Date:   Wed May 11 17:45:50 2016 +

Update translations for abouttor-homepage
---
 br/aboutTor.dtd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/br/aboutTor.dtd b/br/aboutTor.dtd
index d44f164..4aed9fd 100644
--- a/br/aboutTor.dtd
+++ b/br/aboutTor.dtd
@@ -4,7 +4,7 @@
- vim: set sw=2 sts=2 ts=8 et syntax=xml:
   -->
 
-
+
 
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/mat-gui] Update translations for mat-gui

2016-05-11 Thread translation
commit 6090c5b819ae33cee8708aa6cff82789481efb08
Author: Translation commit bot 
Date:   Wed May 11 17:45:33 2016 +

Update translations for mat-gui
---
 br.po | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/br.po b/br.po
index ada3548..b7f300d 100644
--- a/br.po
+++ b/br.po
@@ -3,13 +3,14 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
+# Pierre Morvan , 2016
 msgid ""
 msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2016-02-10 23:06+0100\n"
-"PO-Revision-Date: 2016-03-21 16:34+\n"
-"Last-Translator: carolyn \n"
+"PO-Revision-Date: 2016-05-11 17:16+\n"
+"Last-Translator: Pierre Morvan \n"
 "Language-Team: Breton 
(http://www.transifex.com/otf/torproject/language/br/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -19,7 +20,7 @@ msgstr ""
 
 #: mat-gui:66 mat-gui:422 mat-gui:445
 msgid "Ready"
-msgstr ""
+msgstr "Prest"
 
 #: mat-gui:136
 msgid "Choose files"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-misc] Update translations for tails-misc

2016-05-11 Thread translation
commit 196ba8e83454aff54cf6f71e53c3978048b8b452
Author: Translation commit bot 
Date:   Wed May 11 17:45:46 2016 +

Update translations for tails-misc
---
 br.po | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/br.po b/br.po
index c09ff19..f399c55 100644
--- a/br.po
+++ b/br.po
@@ -3,13 +3,14 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
+# Pierre Morvan , 2016
 msgid ""
 msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2016-04-25 14:02+0200\n"
-"PO-Revision-Date: 2016-04-26 09:06+\n"
-"Last-Translator: carolyn \n"
+"PO-Revision-Date: 2016-05-11 17:18+\n"
+"Last-Translator: Pierre Morvan \n"
 "Language-Team: Breton 
(http://www.transifex.com/otf/torproject/language/br/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -19,7 +20,7 @@ msgstr ""
 
 #: 
config/chroot_local-includes/etc/NetworkManager/dispatcher.d/60-tor-ready.sh:39
 msgid "Tor is ready"
-msgstr ""
+msgstr "Prest eo Tor"
 
 #: 
config/chroot_local-includes/etc/NetworkManager/dispatcher.d/60-tor-ready.sh:40
 msgid "You can now access the Internet."
@@ -550,7 +551,7 @@ msgstr ""
 
 #: 
../config/chroot_local-includes/usr/share/applications/tor-browser.desktop.in.h:1
 msgid "Tor Browser"
-msgstr ""
+msgstr "Keflusker enklask Tor"
 
 #: 
../config/chroot_local-includes/usr/share/applications/tor-browser.desktop.in.h:2
 msgid "Anonymous Web Browser"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Add changes file for ticket 16698

2016-05-11 Thread nickm
commit 48b7db35590afee77fb608b46328959e8a9b2d31
Author: Nick Mathewson 
Date:   Wed May 11 13:43:19 2016 -0400

Add changes file for ticket 16698
---
 changes/ticket16698 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/changes/ticket16698 b/changes/ticket16698
new file mode 100644
index 000..5057050
--- /dev/null
+++ b/changes/ticket16698
@@ -0,0 +1,3 @@
+  o Code simplification and refactoring:
+- Split the 600-line directory_handle_command_get function into
+  separate functions for different URL types. Closes ticket 16698.

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] unbreak the build (when warnings are enabled)

2016-05-11 Thread arma
commit d40e8695f42959d180fe563d447422327535c753
Author: Roger Dingledine 
Date:   Wed May 11 13:42:00 2016 -0400

unbreak the build (when warnings are enabled)
---
 src/or/dirserv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index a367669..01b08ca 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1597,9 +1597,8 @@ dirserv_compute_performance_thresholds(digestmap_t 
*omit_as_sybil)
  * networkstatus_getinfo_by_purpose().
  */
 void
-dirserv_compute_bridge_flag_thresholds()
+dirserv_compute_bridge_flag_thresholds(void)
 {
-
   digestmap_t *omit_as_sybil = digestmap_new();
   dirserv_compute_performance_thresholds(omit_as_sybil);
   digestmap_free(omit_as_sybil, NULL);



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.2.7' into maint-0.2.8

2016-05-11 Thread arma
commit 163cee1b6489c8966681b420d6da49e8ff4a9d1f
Merge: 8d96223 d40e869
Author: Roger Dingledine 
Date:   Wed May 11 13:42:40 2016 -0400

Merge branch 'maint-0.2.7' into maint-0.2.8

 src/or/dirserv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.2.8'

2016-05-11 Thread arma
commit ad8b9dcd4713133fe840608e1ea98b09af6bc85a
Merge: 60e9e48 163cee1
Author: Roger Dingledine 
Date:   Wed May 11 13:43:06 2016 -0400

Merge branch 'maint-0.2.8'

 src/or/dirserv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.8] unbreak the build (when warnings are enabled)

2016-05-11 Thread arma
commit d40e8695f42959d180fe563d447422327535c753
Author: Roger Dingledine 
Date:   Wed May 11 13:42:00 2016 -0400

unbreak the build (when warnings are enabled)
---
 src/or/dirserv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index a367669..01b08ca 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1597,9 +1597,8 @@ dirserv_compute_performance_thresholds(digestmap_t 
*omit_as_sybil)
  * networkstatus_getinfo_by_purpose().
  */
 void
-dirserv_compute_bridge_flag_thresholds()
+dirserv_compute_bridge_flag_thresholds(void)
 {
-
   digestmap_t *omit_as_sybil = digestmap_new();
   dirserv_compute_performance_thresholds(omit_as_sybil);
   digestmap_free(omit_as_sybil, NULL);



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.7] unbreak the build (when warnings are enabled)

2016-05-11 Thread arma
commit d40e8695f42959d180fe563d447422327535c753
Author: Roger Dingledine 
Date:   Wed May 11 13:42:00 2016 -0400

unbreak the build (when warnings are enabled)
---
 src/or/dirserv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index a367669..01b08ca 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1597,9 +1597,8 @@ dirserv_compute_performance_thresholds(digestmap_t 
*omit_as_sybil)
  * networkstatus_getinfo_by_purpose().
  */
 void
-dirserv_compute_bridge_flag_thresholds()
+dirserv_compute_bridge_flag_thresholds(void)
 {
-
   digestmap_t *omit_as_sybil = digestmap_new();
   dirserv_compute_performance_thresholds(omit_as_sybil);
   digestmap_free(omit_as_sybil, NULL);

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'ticket16698_v2'

2016-05-11 Thread nickm
commit 60e9e484487b1163bc531b72597ee24741ce4df0
Merge: 00ee62b 03ae44a
Author: Nick Mathewson 
Date:   Wed May 11 13:39:38 2016 -0400

Merge branch 'ticket16698_v2'

 src/or/directory.c | 293 +++--
 1 file changed, 219 insertions(+), 74 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Split directory_handle_command_get into subfunctions.

2016-05-11 Thread nickm
commit 50d777dcf4ca963fff35935f3c171f4c4a27c72e
Author: Nick Mathewson 
Date:   Tue May 10 13:48:17 2016 -0400

Split directory_handle_command_get into subfunctions.

This was one of our longest functions, at 600 lines.  It makes a nice
table-driven URL-based function instead.

The code is a bit ugly, it leave the indentation as it is in hopes of
making pending directory.c changes easier to merge.  Later we can
clean up the indentation.

Also, remove unused mallinfo export code from directory.c

Closes ticket 16698
---
 src/or/directory.c | 288 +++--
 1 file changed, 216 insertions(+), 72 deletions(-)

diff --git a/src/or/directory.c b/src/or/directory.c
index 7d1bbf0..9252511 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -2854,6 +2854,73 @@ choose_compression_level(ssize_t n_bytes)
   }
 }
 
+/** Information passed to handle a GET request. */
+typedef struct get_handler_args_t {
+  /** True if the client asked for compressed data. */
+  int compressed;
+  /** If nonzero, the time included an if-modified-since header with this
+   * value. */
+  time_t if_modified_since;
+  /** String containing the requested URL or resource. */
+  const char *url;
+  /** String containing the HTTP headers */
+  const char *headers;
+} get_handler_args_t;
+
+/** Entry for handling an HTTP GET request.
+ *
+ * This entry matches a request if "string" is equal to the requested
+ * resource, or if "is_prefix" is true and "string" is a prefix of the
+ * requested resource.
+ *
+ * The 'handler' function is called to handle the request.  It receives
+ * an arguments structure, and must return 0 on success or -1 if we should
+ * close the connection.
+ **/
+typedef struct url_table_ent_s {
+  const char *string;
+  int is_prefix;
+  int (*handler)(dir_connection_t *conn, const get_handler_args_t *args);
+} url_table_ent_t;
+
+static int handle_get_frontpage(dir_connection_t *conn,
+const get_handler_args_t *args);
+static int handle_get_current_consensus(dir_connection_t *conn,
+const get_handler_args_t *args);
+static int handle_get_status_vote(dir_connection_t *conn,
+const get_handler_args_t *args);
+static int handle_get_microdesc(dir_connection_t *conn,
+const get_handler_args_t *args);
+static int handle_get_descriptor(dir_connection_t *conn,
+const get_handler_args_t *args);
+static int handle_get_keys(dir_connection_t *conn,
+const get_handler_args_t *args);
+static int handle_get_rendezvous2(dir_connection_t *conn,
+const get_handler_args_t *args);
+static int handle_get_bytes(dir_connection_t *conn,
+const get_handler_args_t *args);
+static int handle_get_robots(dir_connection_t *conn,
+const get_handler_args_t *args);
+static int handle_get_networkstatus_bridges(dir_connection_t *conn,
+const get_handler_args_t *args);
+
+/** Table for handling GET requests. */
+static const url_table_ent_t url_table[] = {
+  { "/tor/", 0, handle_get_frontpage },
+  { "/tor/status-vote/current/consensus", 1, handle_get_current_consensus },
+  { "/tor/status-vote/current/", 1, handle_get_status_vote },
+  { "/tor/status-vote/next/", 1, handle_get_status_vote },
+  { "/tor/micro/d/", 1, handle_get_microdesc },
+  { "/tor/server/", 1, handle_get_descriptor },
+  { "/tor/extra/", 1, handle_get_descriptor },
+  { "/tor/keys/", 1, handle_get_keys },
+  { "/tor/rendezvous2/", 1, handle_get_rendezvous2 },
+  { "/tor/bytes.txt", 0, handle_get_bytes },
+  { "/tor/robots.txt", 0, handle_get_robots },
+  { "/tor/networkstatus-bridges", 0, handle_get_networkstatus_bridges },
+  { NULL, 0, NULL },
+};
+
 /** Helper function: called when a dirserver gets a complete HTTP GET
  * request.  Look for a request for a directory or for a rendezvous
  * service descriptor.  On finding one, write a response into
@@ -2863,9 +2930,7 @@ STATIC int
 directory_handle_command_get(dir_connection_t *conn, const char *headers,
  const char *req_body, size_t req_body_len)
 {
-  size_t dlen;
   char *url, *url_mem, *header;
-  const or_options_t *options = get_options();
   time_t if_modified_since = 0;
   int compressed;
   size_t url_len;
@@ -2905,10 +2970,46 @@ directory_handle_command_get(dir_connection_t *conn, 
const char *headers,
 url_len -= 2;
   }
 
-  if (!strcmp(url,"/tor/")) {
+  get_handler_args_t args;
+  args.url = url;
+  args.headers = headers;
+  args.if_modified_since = if_modified_since;
+  args.compressed = compressed;
+
+  int i, result = -1;
+  for (i = 0; url_table[i].string; ++i) {
+int match;
+if (url_table[i].is_prefix) {
+  match = !strcmpstart(url, 

[tor-commits] [tor/master] Fix comment for directory_handle_command_get

2016-05-11 Thread nickm
commit 03ae44a9e83b86a64a8e25164241cbaa0164e8cf
Author: Nick Mathewson 
Date:   Wed May 11 13:39:11 2016 -0400

Fix comment for directory_handle_command_get
---
 src/or/directory.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/or/directory.c b/src/or/directory.c
index 9252511..a3ade8f 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -2924,8 +2924,9 @@ static const url_table_ent_t url_table[] = {
 /** Helper function: called when a dirserver gets a complete HTTP GET
  * request.  Look for a request for a directory or for a rendezvous
  * service descriptor.  On finding one, write a response into
- * conn-\>outbuf.  If the request is unrecognized, send a 400.
- * Always return 0. */
+ * conn-\>outbuf.  If the request is unrecognized, send a 404.
+ * Return 0 if we handled this successfully, or -1 if we need to close
+ * the connection. */
 STATIC int
 directory_handle_command_get(dir_connection_t *conn, const char *headers,
  const char *req_body, size_t req_body_len)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Basic work on a publish/subscribe abstraction

2016-05-11 Thread nickm
commit 80a6c8caa3910b18ce50ef870ef0af546c64faa2
Author: Nick Mathewson 
Date:   Thu Mar 24 11:15:19 2016 -0400

Basic work on a publish/subscribe abstraction

The goal here is to provide a way to decouple pieces of the code
that want to learn "when something happens" from those that realize
that it has happened.

The implementation here consists of a generic backend, plus a set of
macros to define and implement a set of type-safe frontends.
---
 src/common/include.am  |   2 +
 src/common/pubsub.c| 129 +++
 src/common/pubsub.h| 177 +
 src/test/include.am|   1 +
 src/test/test.c|   2 +
 src/test/test_pubsub.c |  85 
 6 files changed, 396 insertions(+)

diff --git a/src/common/include.am b/src/common/include.am
index 5afb30d..05342e9 100644
--- a/src/common/include.am
+++ b/src/common/include.am
@@ -67,6 +67,7 @@ LIBOR_A_SOURCES = \
   src/common/di_ops.c  \
   src/common/log.c \
   src/common/memarea.c \
+  src/common/pubsub.c  \
   src/common/util.c\
   src/common/util_format.c \
   src/common/util_process.c\
@@ -132,6 +133,7 @@ COMMONHEADERS = \
   src/common/memarea.h \
   src/common/linux_syscalls.inc\
   src/common/procmon.h \
+  src/common/pubsub.h  \
   src/common/sandbox.h \
   src/common/testsupport.h \
   src/common/torgzip.h \
diff --git a/src/common/pubsub.c b/src/common/pubsub.c
new file mode 100644
index 000..98ec3f8
--- /dev/null
+++ b/src/common/pubsub.c
@@ -0,0 +1,129 @@
+/* Copyright (c) 2016, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file pubsub.c
+ *
+ * \brief DOCDOC
+ */
+
+#include "orconfig.h"
+#include "pubsub.h"
+#include "container.h"
+
+/** Helper: insert s into topic's list of subscribers, keeping
+ * them sorted in priority order. */
+static void
+subscriber_insert(pubsub_topic_t *topic, pubsub_subscriber_t *s)
+{
+  int i;
+  smartlist_t *sl = topic->subscribers;
+  for (i = 0; i < smartlist_len(sl); ++i) {
+pubsub_subscriber_t *other = smartlist_get(sl, i);
+if (s->priority < other->priority) {
+  break;
+}
+  }
+  smartlist_insert(sl, i, s);
+}
+
+/**
+ * Add a new subscriber to topic, where (when an event is triggered),
+ * we'll notify the function fn by passing it subscriber_data.
+ * Return a handle to the subscribe which can later be passed to
+ * pubsub_unsubscribe_().
+ *
+ * Functions are called in priority order, from lowest to highest.
+ *
+ * See pubsub.h for subscribe_flags.
+ */
+const pubsub_subscriber_t *
+pubsub_subscribe_(pubsub_topic_t *topic,
+  pubsub_subscriber_fn_t fn,
+  void *subscriber_data,
+  unsigned subscribe_flags,
+  unsigned priority)
+{
+  tor_assert(! topic->locked);
+  if (subscribe_flags & SUBSCRIBE_ATSTART) {
+tor_assert(topic->n_events_fired == 0);
+  }
+  pubsub_subscriber_t *r = tor_malloc_zero(sizeof(r));
+  r->priority = priority;
+  r->subscriber_flags = subscribe_flags;
+  r->fn = fn;
+  r->subscriber_data = subscriber_data;
+  if (topic->subscribers == NULL) {
+topic->subscribers = smartlist_new();
+  }
+  subscriber_insert(topic, r);
+  return r;
+}
+
+/**
+ * Remove the subscriber s from topic.  After calling this
+ * function, s may no longer be used.
+ */
+int
+pubsub_unsubscribe_(pubsub_topic_t *topic,
+const pubsub_subscriber_t *s)
+{
+  tor_assert(! topic->locked);
+  smartlist_t *sl = topic->subscribers;
+  if (sl == NULL)
+return -1;
+  int i = smartlist_pos(sl, s);
+  if (i == -1)
+return -1;
+  pubsub_subscriber_t *tmp = smartlist_get(sl, i);
+  tor_assert(tmp == s);
+  smartlist_del_keeporder(sl, i);
+  tor_free(tmp);
+  return 0;
+}
+
+/**
+ * For every subscriber s in topic, invoke notify_fn on s and
+ * event_data.  Return 0 if there were no nonzero return values, and -1 if
+ * there were any.
+ */
+int
+pubsub_notify_(pubsub_topic_t *topic, pubsub_notify_fn_t notify_fn,
+   void *event_data, unsigned notify_flags)
+{
+  tor_assert(! topic->locked);
+  (void) notify_flags;
+  smartlist_t *sl = topic->subscribers;
+  int n_bad = 0;
+  ++topic->n_events_fired;
+  if (sl == NULL)
+return -1;
+  topic->locked = 1;
+  SMARTLIST_FOREACH_BEGIN(sl, pubsub_subscriber_t *, s) {
+int r = notify_fn(s, event_data);
+if (r != 0)
+  ++n_bad;
+  } SMARTLIST_FOREACH_END(s);
+  topic->locked = 0;
+  return (n_bad == 0) ? 0 : -1;
+}
+
+/**
+ * Release all storage held by topic.
+ */
+void

[tor-commits] [tor/master] Merge branch 'pubsub_squashed'

2016-05-11 Thread nickm
commit 00ee62b8a55a81518458f99f822c4147e121a4d3
Merge: 3c6f059 80a6c8c
Author: Nick Mathewson 
Date:   Wed May 11 13:26:29 2016 -0400

Merge branch 'pubsub_squashed'

 src/common/include.am  |   2 +
 src/common/pubsub.c| 129 +++
 src/common/pubsub.h| 177 +
 src/test/include.am|   1 +
 src/test/test.c|   2 +
 src/test/test_pubsub.c |  85 
 6 files changed, 396 insertions(+)

diff --cc src/common/include.am
index bae90ad,05342e9..f7c486d
--- a/src/common/include.am
+++ b/src/common/include.am
@@@ -67,8 -67,8 +67,9 @@@ LIBOR_A_SOURCES = 
src/common/di_ops.c \
src/common/log.c\
src/common/memarea.c\
+   src/common/pubsub.c \
src/common/util.c   \
 +  src/common/util_bug.c   \
src/common/util_format.c\
src/common/util_process.c   \
src/common/sandbox.c\
@@@ -134,9 -133,9 +135,10 @@@ COMMONHEADERS = 
src/common/memarea.h\
src/common/linux_syscalls.inc   \
src/common/procmon.h\
+   src/common/pubsub.h \
src/common/sandbox.h\
src/common/testsupport.h\
 +  src/common/timers.h \
src/common/torgzip.h\
src/common/torint.h \
src/common/torlog.h \
diff --cc src/test/test.c
index 3519dca,dcbaf5b..1595c8e
--- a/src/test/test.c
+++ b/src/test/test.c
@@@ -1231,8 -1231,8 +1232,9 @@@ struct testgroup_t testgroups[] = 
{ "util/format/", util_format_tests },
{ "util/logging/", logging_tests },
{ "util/process/", util_process_tests },
+   { "util/pubsub/", pubsub_tests },
{ "util/thread/", thread_tests },
 +  { "util/handle/", handle_tests },
{ "dns/", dns_tests },
END_OF_GROUPS
  };

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge remote-tracking branch 'arma/feature18760'

2016-05-11 Thread nickm
commit 3c6f059e6aa5e4b7937f364cc0101229b6386818
Merge: e9e6a1f 0aacc07
Author: Nick Mathewson 
Date:   Wed May 11 13:22:31 2016 -0400

Merge remote-tracking branch 'arma/feature18760'

 changes/feature18760 | 6 ++
 src/or/dirserv.c | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] encourage rejected relays to contact us

2016-05-11 Thread nickm
commit 0aacc070369d7f9614de9132b2f9e567b96a20bf
Author: Roger Dingledine 
Date:   Tue Apr 12 19:54:04 2016 -0400

encourage rejected relays to contact us

When the directory authorities refuse a bad relay's descriptor,
encourage the relay operator to contact us. Many relay operators
won't notice this line in their logs, but it's a win if even a
few learn why we don't like what their relay was doing.

Resolves ticket 18760.

I didn't specify a contact mechanism (e.g. an email address), because
every time we've done that in the past, a few years later we noticed
that the code was pointing people to an obsolete contact address.
---
 changes/feature18760 | 6 ++
 src/or/dirserv.c | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/changes/feature18760 b/changes/feature18760
new file mode 100644
index 000..e6e8f6a
--- /dev/null
+++ b/changes/feature18760
@@ -0,0 +1,6 @@
+  o Minor features:
+- When the directory authorities refuse a bad relay's descriptor,
+  encourage the relay operator to contact us. Many relay operators
+  won't notice this line in their logs, but it's a win if even a
+  few learn why we don't like what their relay was doing. Resolves
+  ticket 18760.
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index f012b7b..f27fb28 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -349,7 +349,7 @@ dirserv_get_status_impl(const char *id_digest, const char 
*nickname,
 
   if (result & FP_REJECT) {
 if (msg)
-  *msg = "Fingerprint is marked rejected";
+  *msg = "Fingerprint is marked rejected -- please contact us?";
 return FP_REJECT;
   } else if (result & FP_INVALID) {
 if (msg)
@@ -367,7 +367,7 @@ dirserv_get_status_impl(const char *id_digest, const char 
*nickname,
 log_fn(severity, LD_DIRSERV, "Rejecting '%s' because of address '%s'",
nickname, fmt_addr32(addr));
 if (msg)
-  *msg = "Authdir is rejecting routers in this range.";
+  *msg = "Suspicious relay address range -- please contact us?";
 return FP_REJECT;
   }
   if (!authdir_policy_valid_address(addr, or_port)) {



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.2.8'

2016-05-11 Thread nickm
commit e9e6a1f54781bab186e8c107c2e496d7786ab096
Merge: 022d322 8d96223
Author: Nick Mathewson 
Date:   Wed May 11 13:20:57 2016 -0400

Merge branch 'maint-0.2.8'

 changes/bug18816|  2 --
 src/or/routerlist.c | 16 ++--
 2 files changed, 6 insertions(+), 12 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.8] Confim we want certificates from fallbacks

2016-05-11 Thread nickm
commit 797ece042d9666beae3ffc801b148e8bebcd88c0
Author: teor (Tim Wilson-Brown) 
Date:   Wed May 11 13:08:45 2016 -0400

Confim we want certificates from fallbacks

Comment-only change
---
 src/or/routerlist.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 85e9e7d..d40d704 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -913,7 +913,8 @@ authority_certs_fetch_missing(networkstatus_t *status, 
time_t now)
 
 if (smartlist_len(fps) > 1) {
   resource = smartlist_join_strings(fps, "", 0, NULL);
-  /* XXX - do we want certs from authorities or mirrors? - teor */
+  /* We want certs from mirrors, because they will almost always succeed.
+   */
   directory_get_from_dirserver(DIR_PURPOSE_FETCH_CERTIFICATE, 0,
resource, PDS_RETRY_IF_NO_SERVERS,
DL_WANT_ANY_DIRSERVER);
@@ -959,7 +960,8 @@ authority_certs_fetch_missing(networkstatus_t *status, 
time_t now)
 
 if (smartlist_len(fp_pairs) > 1) {
   resource = smartlist_join_strings(fp_pairs, "", 0, NULL);
-  /* XXX - do we want certs from authorities or mirrors? - teor */
+  /* We want certs from mirrors, because they will almost always succeed.
+   */
   directory_get_from_dirserver(DIR_PURPOSE_FETCH_CERTIFICATE, 0,
resource, PDS_RETRY_IF_NO_SERVERS,
DL_WANT_ANY_DIRSERVER);



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.8] Revert "Switch between fallback and authority when auth cert fetch fails"

2016-05-11 Thread nickm
commit 2cbad2aac76d911cce7cee95e91aebc1b1fcb509
Author: teor (Tim Wilson-Brown) 
Date:   Wed May 11 13:06:13 2016 -0400

Revert "Switch between fallback and authority when auth cert fetch fails"

This reverts commit 92d7ee08b8c51b4b29f68c6d00ca4aa91ea5a66b.
---
 changes/bug18816|  2 --
 src/or/routerlist.c | 14 --
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/changes/bug18816 b/changes/bug18816
index 0545512..7265f5a 100644
--- a/changes/bug18816
+++ b/changes/bug18816
@@ -1,6 +1,4 @@
   o Minor bugfix (bootstrap):
 - Consistently use the consensus download schedule for
   authority certificates.
-- When downloading authority certificates fails, switch from
-  using a fallback to using an authority.
   Resolves ticket 18816; fix on fddb814fe in 0.2.4.13-alpha.
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 3169343..85e9e7d 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -912,14 +912,11 @@ authority_certs_fetch_missing(networkstatus_t *status, 
time_t now)
 } SMARTLIST_FOREACH_END(d);
 
 if (smartlist_len(fps) > 1) {
-  static int want_auth = 0;
   resource = smartlist_join_strings(fps, "", 0, NULL);
+  /* XXX - do we want certs from authorities or mirrors? - teor */
   directory_get_from_dirserver(DIR_PURPOSE_FETCH_CERTIFICATE, 0,
resource, PDS_RETRY_IF_NO_SERVERS,
-   want_auth ? DL_WANT_AUTHORITY
- : DL_WANT_ANY_DIRSERVER);
-  /* on failure, swap between using fallbacks and authorities */
-  want_auth = !want_auth;
+   DL_WANT_ANY_DIRSERVER);
   tor_free(resource);
 }
 /* else we didn't add any: they were all pending */
@@ -961,14 +958,11 @@ authority_certs_fetch_missing(networkstatus_t *status, 
time_t now)
 } SMARTLIST_FOREACH_END(d);
 
 if (smartlist_len(fp_pairs) > 1) {
-  static int want_auth = 0;
   resource = smartlist_join_strings(fp_pairs, "", 0, NULL);
+  /* XXX - do we want certs from authorities or mirrors? - teor */
   directory_get_from_dirserver(DIR_PURPOSE_FETCH_CERTIFICATE, 0,
resource, PDS_RETRY_IF_NO_SERVERS,
-   want_auth ? DL_WANT_AUTHORITY
- : DL_WANT_ANY_DIRSERVER);
-  /* on failure, swap between using fallbacks and authorities */
-  want_auth = !want_auth;
+   DL_WANT_ANY_DIRSERVER);
   tor_free(resource);
 }
 /* else they were all pending */



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.8] Merge remote-tracking branch 'teor/bug18816_simplify' into maint-0.2.8

2016-05-11 Thread nickm
commit 8d962233f65022dc7fbc0466c981e3e7f2aea0c8
Merge: 24fbb9a 797ece0
Author: Nick Mathewson 
Date:   Wed May 11 13:20:51 2016 -0400

Merge remote-tracking branch 'teor/bug18816_simplify' into maint-0.2.8

 changes/bug18816|  2 --
 src/or/routerlist.c | 16 ++--
 2 files changed, 6 insertions(+), 12 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge remote-tracking branch 'teor/bug18816_simplify' into maint-0.2.8

2016-05-11 Thread nickm
commit 8d962233f65022dc7fbc0466c981e3e7f2aea0c8
Merge: 24fbb9a 797ece0
Author: Nick Mathewson 
Date:   Wed May 11 13:20:51 2016 -0400

Merge remote-tracking branch 'teor/bug18816_simplify' into maint-0.2.8

 changes/bug18816|  2 --
 src/or/routerlist.c | 16 ++--
 2 files changed, 6 insertions(+), 12 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Revert "Switch between fallback and authority when auth cert fetch fails"

2016-05-11 Thread nickm
commit 2cbad2aac76d911cce7cee95e91aebc1b1fcb509
Author: teor (Tim Wilson-Brown) 
Date:   Wed May 11 13:06:13 2016 -0400

Revert "Switch between fallback and authority when auth cert fetch fails"

This reverts commit 92d7ee08b8c51b4b29f68c6d00ca4aa91ea5a66b.
---
 changes/bug18816|  2 --
 src/or/routerlist.c | 14 --
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/changes/bug18816 b/changes/bug18816
index 0545512..7265f5a 100644
--- a/changes/bug18816
+++ b/changes/bug18816
@@ -1,6 +1,4 @@
   o Minor bugfix (bootstrap):
 - Consistently use the consensus download schedule for
   authority certificates.
-- When downloading authority certificates fails, switch from
-  using a fallback to using an authority.
   Resolves ticket 18816; fix on fddb814fe in 0.2.4.13-alpha.
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 3169343..85e9e7d 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -912,14 +912,11 @@ authority_certs_fetch_missing(networkstatus_t *status, 
time_t now)
 } SMARTLIST_FOREACH_END(d);
 
 if (smartlist_len(fps) > 1) {
-  static int want_auth = 0;
   resource = smartlist_join_strings(fps, "", 0, NULL);
+  /* XXX - do we want certs from authorities or mirrors? - teor */
   directory_get_from_dirserver(DIR_PURPOSE_FETCH_CERTIFICATE, 0,
resource, PDS_RETRY_IF_NO_SERVERS,
-   want_auth ? DL_WANT_AUTHORITY
- : DL_WANT_ANY_DIRSERVER);
-  /* on failure, swap between using fallbacks and authorities */
-  want_auth = !want_auth;
+   DL_WANT_ANY_DIRSERVER);
   tor_free(resource);
 }
 /* else we didn't add any: they were all pending */
@@ -961,14 +958,11 @@ authority_certs_fetch_missing(networkstatus_t *status, 
time_t now)
 } SMARTLIST_FOREACH_END(d);
 
 if (smartlist_len(fp_pairs) > 1) {
-  static int want_auth = 0;
   resource = smartlist_join_strings(fp_pairs, "", 0, NULL);
+  /* XXX - do we want certs from authorities or mirrors? - teor */
   directory_get_from_dirserver(DIR_PURPOSE_FETCH_CERTIFICATE, 0,
resource, PDS_RETRY_IF_NO_SERVERS,
-   want_auth ? DL_WANT_AUTHORITY
- : DL_WANT_ANY_DIRSERVER);
-  /* on failure, swap between using fallbacks and authorities */
-  want_auth = !want_auth;
+   DL_WANT_ANY_DIRSERVER);
   tor_free(resource);
 }
 /* else they were all pending */



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Confim we want certificates from fallbacks

2016-05-11 Thread nickm
commit 797ece042d9666beae3ffc801b148e8bebcd88c0
Author: teor (Tim Wilson-Brown) 
Date:   Wed May 11 13:08:45 2016 -0400

Confim we want certificates from fallbacks

Comment-only change
---
 src/or/routerlist.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 85e9e7d..d40d704 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -913,7 +913,8 @@ authority_certs_fetch_missing(networkstatus_t *status, 
time_t now)
 
 if (smartlist_len(fps) > 1) {
   resource = smartlist_join_strings(fps, "", 0, NULL);
-  /* XXX - do we want certs from authorities or mirrors? - teor */
+  /* We want certs from mirrors, because they will almost always succeed.
+   */
   directory_get_from_dirserver(DIR_PURPOSE_FETCH_CERTIFICATE, 0,
resource, PDS_RETRY_IF_NO_SERVERS,
DL_WANT_ANY_DIRSERVER);
@@ -959,7 +960,8 @@ authority_certs_fetch_missing(networkstatus_t *status, 
time_t now)
 
 if (smartlist_len(fp_pairs) > 1) {
   resource = smartlist_join_strings(fp_pairs, "", 0, NULL);
-  /* XXX - do we want certs from authorities or mirrors? - teor */
+  /* We want certs from mirrors, because they will almost always succeed.
+   */
   directory_get_from_dirserver(DIR_PURPOSE_FETCH_CERTIFICATE, 0,
resource, PDS_RETRY_IF_NO_SERVERS,
DL_WANT_ANY_DIRSERVER);



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.8] Merge branch 'maint-0.2.7' into maint-0.2.8

2016-05-11 Thread nickm
commit 24fbb9a81b19cc20df9a204d3203d1b914fb267d
Merge: 28e1aa1 4e94580
Author: Nick Mathewson 
Date:   Wed May 11 13:15:17 2016 -0400

Merge branch 'maint-0.2.7' into maint-0.2.8

 changes/bug19032   |  4 
 src/or/dirserv.c   | 31 ---
 src/or/dirserv.h   |  2 +-
 src/or/networkstatus.c |  3 +--
 4 files changed, 22 insertions(+), 18 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.2.7' into maint-0.2.8

2016-05-11 Thread nickm
commit 24fbb9a81b19cc20df9a204d3203d1b914fb267d
Merge: 28e1aa1 4e94580
Author: Nick Mathewson 
Date:   Wed May 11 13:15:17 2016 -0400

Merge branch 'maint-0.2.7' into maint-0.2.8

 changes/bug19032   |  4 
 src/or/dirserv.c   | 31 ---
 src/or/dirserv.h   |  2 +-
 src/or/networkstatus.c |  3 +--
 4 files changed, 22 insertions(+), 18 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Fix out-of-bounds write during voting with duplicate ed25519 keys

2016-05-11 Thread nickm
commit bf3e32a45288b64e5535e02f40bd2bcb93c8a520
Author: John Brooks 
Date:   Wed May 11 12:13:22 2016 -0400

Fix out-of-bounds write during voting with duplicate ed25519 keys

In dirserv_compute_performance_thresholds, we allocate arrays based
on the length of 'routers', a list of routerinfo_t, but loop over
the nodelist. The 'routers' list may be shorter when relays were
filtered by routers_make_ed_keys_unique, leading to an out-of-bounds
write on directory authorities.

This bug was originally introduced in 26e89742, but it doesn't look
possible to trigger until routers_make_ed_keys_unique was introduced
in 13a31e72.

Fixes bug 19032; bugfix on tor 0.2.8.2-alpha.
---
 changes/bug19032   |  4 
 src/or/dirserv.c   | 31 ---
 src/or/dirserv.h   |  2 +-
 src/or/networkstatus.c |  3 +--
 4 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/changes/bug19032 b/changes/bug19032
new file mode 100644
index 000..93f17c2
--- /dev/null
+++ b/changes/bug19032
@@ -0,0 +1,4 @@
+  o Major bugfixes (security, directory authorities):
+- Fix a crash and out-of-bounds write during authority voting, when the
+  list of relays includes duplicate ed25519 identity keys. Fixes bug 19032;
+  bugfix on 0.2.8.2-alpha.
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index ae67e8e..a367669 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1422,13 +1422,13 @@ router_counts_toward_thresholds(const node_t *node, 
time_t now,
  *
  * Also, set the is_exit flag of each router appropriately. */
 static void
-dirserv_compute_performance_thresholds(const smartlist_t *routers,
-   digestmap_t *omit_as_sybil)
+dirserv_compute_performance_thresholds(digestmap_t *omit_as_sybil)
 {
   int n_active, n_active_nonexit, n_familiar;
   uint32_t *uptimes, *bandwidths_kb, *bandwidths_excluding_exits_kb;
   long *tks;
   double *mtbfs, *wfus;
+  smartlist_t *nodelist;
   time_t now = time(NULL);
   const or_options_t *options = get_options();
 
@@ -1446,27 +1446,28 @@ dirserv_compute_performance_thresholds(const 
smartlist_t *routers,
   guard_tk = 0;
   guard_wfu = 0;
 
+  nodelist_assert_ok();
+  nodelist = nodelist_get_list();
+
   /* Initialize arrays that will hold values for each router.  We'll
* sort them and use that to compute thresholds. */
   n_active = n_active_nonexit = 0;
   /* Uptime for every active router. */
-  uptimes = tor_calloc(smartlist_len(routers), sizeof(uint32_t));
+  uptimes = tor_calloc(smartlist_len(nodelist), sizeof(uint32_t));
   /* Bandwidth for every active router. */
-  bandwidths_kb = tor_calloc(smartlist_len(routers), sizeof(uint32_t));
+  bandwidths_kb = tor_calloc(smartlist_len(nodelist), sizeof(uint32_t));
   /* Bandwidth for every active non-exit router. */
   bandwidths_excluding_exits_kb =
-tor_calloc(smartlist_len(routers), sizeof(uint32_t));
+tor_calloc(smartlist_len(nodelist), sizeof(uint32_t));
   /* Weighted mean time between failure for each active router. */
-  mtbfs = tor_calloc(smartlist_len(routers), sizeof(double));
+  mtbfs = tor_calloc(smartlist_len(nodelist), sizeof(double));
   /* Time-known for each active router. */
-  tks = tor_calloc(smartlist_len(routers), sizeof(long));
+  tks = tor_calloc(smartlist_len(nodelist), sizeof(long));
   /* Weighted fractional uptime for each active router. */
-  wfus = tor_calloc(smartlist_len(routers), sizeof(double));
-
-  nodelist_assert_ok();
+  wfus = tor_calloc(smartlist_len(nodelist), sizeof(double));
 
   /* Now, fill in the arrays. */
-  SMARTLIST_FOREACH_BEGIN(nodelist_get_list(), node_t *, node) {
+  SMARTLIST_FOREACH_BEGIN(nodelist, node_t *, node) {
 if (options->BridgeAuthoritativeDir &&
 node->ri &&
 node->ri->purpose != ROUTER_PURPOSE_BRIDGE)
@@ -1542,7 +1543,7 @@ dirserv_compute_performance_thresholds(const smartlist_t 
*routers,
* fill wfus with the wfu of every such "familiar" router. */
   n_familiar = 0;
 
-  SMARTLIST_FOREACH_BEGIN(nodelist_get_list(), node_t *, node) {
+  SMARTLIST_FOREACH_BEGIN(nodelist, node_t *, node) {
   if (router_counts_toward_thresholds(node, now,
   omit_as_sybil, require_mbw)) {
 routerinfo_t *ri = node->ri;
@@ -1596,11 +1597,11 @@ dirserv_compute_performance_thresholds(const 
smartlist_t *routers,
  * networkstatus_getinfo_by_purpose().
  */
 void
-dirserv_compute_bridge_flag_thresholds(const smartlist_t *routers)
+dirserv_compute_bridge_flag_thresholds()
 {
 
   digestmap_t *omit_as_sybil = digestmap_new();
-  dirserv_compute_performance_thresholds(routers, omit_as_sybil);
+  dirserv_compute_performance_thresholds(omit_as_sybil);
   digestmap_free(omit_as_sybil, NULL);
 }
 
@@ -2870,7 +2871,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t 
*private_key,
* this must come before dirserv_compute_performance_thresholds() */
   

[tor-commits] [tor/master] Merge remote-tracking branch 'special/bug19032-027' into maint-0.2.7

2016-05-11 Thread nickm
commit 4e94580591da579e53461aeedfb1340836427c02
Merge: 039fc84 bf3e32a
Author: Nick Mathewson 
Date:   Wed May 11 13:13:23 2016 -0400

Merge remote-tracking branch 'special/bug19032-027' into maint-0.2.7

 changes/bug19032   |  4 
 src/or/dirserv.c   | 31 ---
 src/or/dirserv.h   |  2 +-
 src/or/networkstatus.c |  3 +--
 4 files changed, 22 insertions(+), 18 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.8] Fix out-of-bounds write during voting with duplicate ed25519 keys

2016-05-11 Thread nickm
commit bf3e32a45288b64e5535e02f40bd2bcb93c8a520
Author: John Brooks 
Date:   Wed May 11 12:13:22 2016 -0400

Fix out-of-bounds write during voting with duplicate ed25519 keys

In dirserv_compute_performance_thresholds, we allocate arrays based
on the length of 'routers', a list of routerinfo_t, but loop over
the nodelist. The 'routers' list may be shorter when relays were
filtered by routers_make_ed_keys_unique, leading to an out-of-bounds
write on directory authorities.

This bug was originally introduced in 26e89742, but it doesn't look
possible to trigger until routers_make_ed_keys_unique was introduced
in 13a31e72.

Fixes bug 19032; bugfix on tor 0.2.8.2-alpha.
---
 changes/bug19032   |  4 
 src/or/dirserv.c   | 31 ---
 src/or/dirserv.h   |  2 +-
 src/or/networkstatus.c |  3 +--
 4 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/changes/bug19032 b/changes/bug19032
new file mode 100644
index 000..93f17c2
--- /dev/null
+++ b/changes/bug19032
@@ -0,0 +1,4 @@
+  o Major bugfixes (security, directory authorities):
+- Fix a crash and out-of-bounds write during authority voting, when the
+  list of relays includes duplicate ed25519 identity keys. Fixes bug 19032;
+  bugfix on 0.2.8.2-alpha.
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index ae67e8e..a367669 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1422,13 +1422,13 @@ router_counts_toward_thresholds(const node_t *node, 
time_t now,
  *
  * Also, set the is_exit flag of each router appropriately. */
 static void
-dirserv_compute_performance_thresholds(const smartlist_t *routers,
-   digestmap_t *omit_as_sybil)
+dirserv_compute_performance_thresholds(digestmap_t *omit_as_sybil)
 {
   int n_active, n_active_nonexit, n_familiar;
   uint32_t *uptimes, *bandwidths_kb, *bandwidths_excluding_exits_kb;
   long *tks;
   double *mtbfs, *wfus;
+  smartlist_t *nodelist;
   time_t now = time(NULL);
   const or_options_t *options = get_options();
 
@@ -1446,27 +1446,28 @@ dirserv_compute_performance_thresholds(const 
smartlist_t *routers,
   guard_tk = 0;
   guard_wfu = 0;
 
+  nodelist_assert_ok();
+  nodelist = nodelist_get_list();
+
   /* Initialize arrays that will hold values for each router.  We'll
* sort them and use that to compute thresholds. */
   n_active = n_active_nonexit = 0;
   /* Uptime for every active router. */
-  uptimes = tor_calloc(smartlist_len(routers), sizeof(uint32_t));
+  uptimes = tor_calloc(smartlist_len(nodelist), sizeof(uint32_t));
   /* Bandwidth for every active router. */
-  bandwidths_kb = tor_calloc(smartlist_len(routers), sizeof(uint32_t));
+  bandwidths_kb = tor_calloc(smartlist_len(nodelist), sizeof(uint32_t));
   /* Bandwidth for every active non-exit router. */
   bandwidths_excluding_exits_kb =
-tor_calloc(smartlist_len(routers), sizeof(uint32_t));
+tor_calloc(smartlist_len(nodelist), sizeof(uint32_t));
   /* Weighted mean time between failure for each active router. */
-  mtbfs = tor_calloc(smartlist_len(routers), sizeof(double));
+  mtbfs = tor_calloc(smartlist_len(nodelist), sizeof(double));
   /* Time-known for each active router. */
-  tks = tor_calloc(smartlist_len(routers), sizeof(long));
+  tks = tor_calloc(smartlist_len(nodelist), sizeof(long));
   /* Weighted fractional uptime for each active router. */
-  wfus = tor_calloc(smartlist_len(routers), sizeof(double));
-
-  nodelist_assert_ok();
+  wfus = tor_calloc(smartlist_len(nodelist), sizeof(double));
 
   /* Now, fill in the arrays. */
-  SMARTLIST_FOREACH_BEGIN(nodelist_get_list(), node_t *, node) {
+  SMARTLIST_FOREACH_BEGIN(nodelist, node_t *, node) {
 if (options->BridgeAuthoritativeDir &&
 node->ri &&
 node->ri->purpose != ROUTER_PURPOSE_BRIDGE)
@@ -1542,7 +1543,7 @@ dirserv_compute_performance_thresholds(const smartlist_t 
*routers,
* fill wfus with the wfu of every such "familiar" router. */
   n_familiar = 0;
 
-  SMARTLIST_FOREACH_BEGIN(nodelist_get_list(), node_t *, node) {
+  SMARTLIST_FOREACH_BEGIN(nodelist, node_t *, node) {
   if (router_counts_toward_thresholds(node, now,
   omit_as_sybil, require_mbw)) {
 routerinfo_t *ri = node->ri;
@@ -1596,11 +1597,11 @@ dirserv_compute_performance_thresholds(const 
smartlist_t *routers,
  * networkstatus_getinfo_by_purpose().
  */
 void
-dirserv_compute_bridge_flag_thresholds(const smartlist_t *routers)
+dirserv_compute_bridge_flag_thresholds()
 {
 
   digestmap_t *omit_as_sybil = digestmap_new();
-  dirserv_compute_performance_thresholds(routers, omit_as_sybil);
+  dirserv_compute_performance_thresholds(omit_as_sybil);
   digestmap_free(omit_as_sybil, NULL);
 }
 
@@ -2870,7 +2871,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t 
*private_key,
* this must come before dirserv_compute_performance_thresholds() */
   

[tor-commits] [tor/master] Merge branch 'maint-0.2.8'

2016-05-11 Thread nickm
commit 022d32252a34fc881d2f9ed661d659b752b83c34
Merge: 71267be 24fbb9a
Author: Nick Mathewson 
Date:   Wed May 11 13:17:02 2016 -0400

Merge branch 'maint-0.2.8'

 changes/bug19032   |  4 
 src/or/dirserv.c   | 31 ---
 src/or/dirserv.h   |  2 +-
 src/or/networkstatus.c |  3 +--
 4 files changed, 22 insertions(+), 18 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.7] Fix out-of-bounds write during voting with duplicate ed25519 keys

2016-05-11 Thread nickm
commit bf3e32a45288b64e5535e02f40bd2bcb93c8a520
Author: John Brooks 
Date:   Wed May 11 12:13:22 2016 -0400

Fix out-of-bounds write during voting with duplicate ed25519 keys

In dirserv_compute_performance_thresholds, we allocate arrays based
on the length of 'routers', a list of routerinfo_t, but loop over
the nodelist. The 'routers' list may be shorter when relays were
filtered by routers_make_ed_keys_unique, leading to an out-of-bounds
write on directory authorities.

This bug was originally introduced in 26e89742, but it doesn't look
possible to trigger until routers_make_ed_keys_unique was introduced
in 13a31e72.

Fixes bug 19032; bugfix on tor 0.2.8.2-alpha.
---
 changes/bug19032   |  4 
 src/or/dirserv.c   | 31 ---
 src/or/dirserv.h   |  2 +-
 src/or/networkstatus.c |  3 +--
 4 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/changes/bug19032 b/changes/bug19032
new file mode 100644
index 000..93f17c2
--- /dev/null
+++ b/changes/bug19032
@@ -0,0 +1,4 @@
+  o Major bugfixes (security, directory authorities):
+- Fix a crash and out-of-bounds write during authority voting, when the
+  list of relays includes duplicate ed25519 identity keys. Fixes bug 19032;
+  bugfix on 0.2.8.2-alpha.
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index ae67e8e..a367669 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1422,13 +1422,13 @@ router_counts_toward_thresholds(const node_t *node, 
time_t now,
  *
  * Also, set the is_exit flag of each router appropriately. */
 static void
-dirserv_compute_performance_thresholds(const smartlist_t *routers,
-   digestmap_t *omit_as_sybil)
+dirserv_compute_performance_thresholds(digestmap_t *omit_as_sybil)
 {
   int n_active, n_active_nonexit, n_familiar;
   uint32_t *uptimes, *bandwidths_kb, *bandwidths_excluding_exits_kb;
   long *tks;
   double *mtbfs, *wfus;
+  smartlist_t *nodelist;
   time_t now = time(NULL);
   const or_options_t *options = get_options();
 
@@ -1446,27 +1446,28 @@ dirserv_compute_performance_thresholds(const 
smartlist_t *routers,
   guard_tk = 0;
   guard_wfu = 0;
 
+  nodelist_assert_ok();
+  nodelist = nodelist_get_list();
+
   /* Initialize arrays that will hold values for each router.  We'll
* sort them and use that to compute thresholds. */
   n_active = n_active_nonexit = 0;
   /* Uptime for every active router. */
-  uptimes = tor_calloc(smartlist_len(routers), sizeof(uint32_t));
+  uptimes = tor_calloc(smartlist_len(nodelist), sizeof(uint32_t));
   /* Bandwidth for every active router. */
-  bandwidths_kb = tor_calloc(smartlist_len(routers), sizeof(uint32_t));
+  bandwidths_kb = tor_calloc(smartlist_len(nodelist), sizeof(uint32_t));
   /* Bandwidth for every active non-exit router. */
   bandwidths_excluding_exits_kb =
-tor_calloc(smartlist_len(routers), sizeof(uint32_t));
+tor_calloc(smartlist_len(nodelist), sizeof(uint32_t));
   /* Weighted mean time between failure for each active router. */
-  mtbfs = tor_calloc(smartlist_len(routers), sizeof(double));
+  mtbfs = tor_calloc(smartlist_len(nodelist), sizeof(double));
   /* Time-known for each active router. */
-  tks = tor_calloc(smartlist_len(routers), sizeof(long));
+  tks = tor_calloc(smartlist_len(nodelist), sizeof(long));
   /* Weighted fractional uptime for each active router. */
-  wfus = tor_calloc(smartlist_len(routers), sizeof(double));
-
-  nodelist_assert_ok();
+  wfus = tor_calloc(smartlist_len(nodelist), sizeof(double));
 
   /* Now, fill in the arrays. */
-  SMARTLIST_FOREACH_BEGIN(nodelist_get_list(), node_t *, node) {
+  SMARTLIST_FOREACH_BEGIN(nodelist, node_t *, node) {
 if (options->BridgeAuthoritativeDir &&
 node->ri &&
 node->ri->purpose != ROUTER_PURPOSE_BRIDGE)
@@ -1542,7 +1543,7 @@ dirserv_compute_performance_thresholds(const smartlist_t 
*routers,
* fill wfus with the wfu of every such "familiar" router. */
   n_familiar = 0;
 
-  SMARTLIST_FOREACH_BEGIN(nodelist_get_list(), node_t *, node) {
+  SMARTLIST_FOREACH_BEGIN(nodelist, node_t *, node) {
   if (router_counts_toward_thresholds(node, now,
   omit_as_sybil, require_mbw)) {
 routerinfo_t *ri = node->ri;
@@ -1596,11 +1597,11 @@ dirserv_compute_performance_thresholds(const 
smartlist_t *routers,
  * networkstatus_getinfo_by_purpose().
  */
 void
-dirserv_compute_bridge_flag_thresholds(const smartlist_t *routers)
+dirserv_compute_bridge_flag_thresholds()
 {
 
   digestmap_t *omit_as_sybil = digestmap_new();
-  dirserv_compute_performance_thresholds(routers, omit_as_sybil);
+  dirserv_compute_performance_thresholds(omit_as_sybil);
   digestmap_free(omit_as_sybil, NULL);
 }
 
@@ -2870,7 +2871,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t 
*private_key,
* this must come before dirserv_compute_performance_thresholds() */
   

[tor-commits] [tor/maint-0.2.8] Merge remote-tracking branch 'special/bug19032-027' into maint-0.2.7

2016-05-11 Thread nickm
commit 4e94580591da579e53461aeedfb1340836427c02
Merge: 039fc84 bf3e32a
Author: Nick Mathewson 
Date:   Wed May 11 13:13:23 2016 -0400

Merge remote-tracking branch 'special/bug19032-027' into maint-0.2.7

 changes/bug19032   |  4 
 src/or/dirserv.c   | 31 ---
 src/or/dirserv.h   |  2 +-
 src/or/networkstatus.c |  3 +--
 4 files changed, 22 insertions(+), 18 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.7] Merge remote-tracking branch 'special/bug19032-027' into maint-0.2.7

2016-05-11 Thread nickm
commit 4e94580591da579e53461aeedfb1340836427c02
Merge: 039fc84 bf3e32a
Author: Nick Mathewson 
Date:   Wed May 11 13:13:23 2016 -0400

Merge remote-tracking branch 'special/bug19032-027' into maint-0.2.7

 changes/bug19032   |  4 
 src/or/dirserv.c   | 31 ---
 src/or/dirserv.h   |  2 +-
 src/or/networkstatus.c |  3 +--
 4 files changed, 22 insertions(+), 18 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-messenger-privdtd] Update translations for tor-messenger-privdtd

2016-05-11 Thread translation
commit dec09614b2f0affeb24792d628ff09d65dc19b92
Author: Translation commit bot 
Date:   Wed May 11 17:16:38 2016 +

Update translations for tor-messenger-privdtd
---
 br/priv.dtd | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/br/priv.dtd b/br/priv.dtd
new file mode 100644
index 000..7007979
--- /dev/null
+++ b/br/priv.dtd
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/https_everywhere_completed] Update translations for https_everywhere_completed

2016-05-11 Thread translation
commit a488dbca56ea7ab36e65c6ce33202a403e53d216
Author: Translation commit bot 
Date:   Wed May 11 16:45:20 2016 +

Update translations for https_everywhere_completed
---
 ca/ssl-observatory.dtd | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ca/ssl-observatory.dtd b/ca/ssl-observatory.dtd
index afbccbe..a15fd13 100644
--- a/ca/ssl-observatory.dtd
+++ b/ca/ssl-observatory.dtd
@@ -79,7 +79,7 @@ ha vist. Passeu amb el cursor per sobre les opcions per a 
més informació. ">
 "Seguirem intentant mantenir les dades anònimes, però aquesta opció és 
menys segura">
 
 
+"Envair i comprovar certificats per a noms DNS no públics">
 
 
@@ -89,7 +89,7 @@ ha vist. Passeu amb el cursor per sobre les opcions per a 
més informació. ">
 
 
 
-
+
 
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/https_everywhere] Update translations for https_everywhere

2016-05-11 Thread translation
commit 6aaa57f329cc64630cb950c275d71803eba8d99a
Author: Translation commit bot 
Date:   Wed May 11 16:45:16 2016 +

Update translations for https_everywhere
---
 ca/ssl-observatory.dtd | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ca/ssl-observatory.dtd b/ca/ssl-observatory.dtd
index afbccbe..a15fd13 100644
--- a/ca/ssl-observatory.dtd
+++ b/ca/ssl-observatory.dtd
@@ -79,7 +79,7 @@ ha vist. Passeu amb el cursor per sobre les opcions per a 
més informació. ">
 "Seguirem intentant mantenir les dades anònimes, però aquesta opció és 
menys segura">
 
 
+"Envair i comprovar certificats per a noms DNS no públics">
 
 
@@ -89,7 +89,7 @@ ha vist. Passeu amb el cursor per sobre les opcions per a 
més informació. ">
 
 
 
-
+
 
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.2.8'

2016-05-11 Thread nickm
commit 71267bef4c64b791346f8cdd54f3be4cc3fc38ca
Merge: 79f9e63 28e1aa1
Author: Nick Mathewson 
Date:   Wed May 11 12:36:55 2016 -0400

Merge branch 'maint-0.2.8'

 changes/bug18761 |  3 +++
 src/or/rendservice.c | 15 ++-
 2 files changed, 13 insertions(+), 5 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.8] Log find_rp_for_intro_() failures at LOG_PROTOCOL_WARN.

2016-05-11 Thread nickm
commit b59d79134e1089d310278a70788401835c1e5c10
Author: Nick Mathewson 
Date:   Tue Apr 26 20:46:44 2016 -0400

Log find_rp_for_intro_() failures at LOG_PROTOCOL_WARN.

Closes ticket 18761.

Also fix a whitespace issue.
---
 changes/bug18761 |  3 +++
 src/or/rendservice.c | 15 ++-
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/changes/bug18761 b/changes/bug18761
new file mode 100644
index 000..78500a8
--- /dev/null
+++ b/changes/bug18761
@@ -0,0 +1,3 @@
+  o Minor feature (logging):
+- When rejecting a misformed INTRODUCE2 cell, only log at PROTOCOL_WARN
+  severity. Closes ticket 18761.
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 39e5831..6f41f3b 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -1445,6 +1445,7 @@ rend_service_receive_introduction(origin_circuit_t 
*circuit,
   int status = 0, result;
   const or_options_t *options = get_options();
   char *err_msg = NULL;
+  int err_msg_severity = LOG_WARN;
   const char *stage_descr = NULL;
   int reason = END_CIRC_REASON_TORPROTOCOL;
   /* Service/circuit/key stuff we can learn before parsing */
@@ -1596,8 +1597,10 @@ rend_service_receive_introduction(origin_circuit_t 
*circuit,
 
   /* Find the rendezvous point */
   rp = find_rp_for_intro(parsed_req, _msg);
-  if (!rp)
+  if (!rp) {
+err_msg_severity = LOG_PROTOCOL_WARN;
 goto log_error;
+  }
 
   /* Check if we'd refuse to talk to this router */
   if (options->StrictNodes &&
@@ -1735,7 +1738,7 @@ rend_service_receive_introduction(origin_circuit_t 
*circuit,
 }
   }
 
-  log_warn(LD_REND, "%s on circ %u", err_msg,
+  log_fn(err_msg_severity, LD_REND, "%s on circ %u", err_msg,
(unsigned)circuit->base_.n_circ_id);
  err:
   status = -1;
@@ -1797,7 +1800,7 @@ find_rp_for_intro(const rend_intro_cell_t *intro,
 if (!rp) {
   if (err_msg_out) {
 tor_asprintf(_msg,
- "Could build extend_info_t for router %s named "
+ "Couldn't build extend_info_t for router %s named "
  "in INTRODUCE2 cell",
  escaped_safe_str_client(rp_nickname));
   }
@@ -1833,8 +1836,10 @@ find_rp_for_intro(const rend_intro_cell_t *intro,
   goto done;
 
  err:
-  if (err_msg_out) *err_msg_out = err_msg;
-  else tor_free(err_msg);
+  if (err_msg_out)
+*err_msg_out = err_msg;
+  else
+tor_free(err_msg);
 
  done:
   return rp;



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Log find_rp_for_intro_() failures at LOG_PROTOCOL_WARN.

2016-05-11 Thread nickm
commit b59d79134e1089d310278a70788401835c1e5c10
Author: Nick Mathewson 
Date:   Tue Apr 26 20:46:44 2016 -0400

Log find_rp_for_intro_() failures at LOG_PROTOCOL_WARN.

Closes ticket 18761.

Also fix a whitespace issue.
---
 changes/bug18761 |  3 +++
 src/or/rendservice.c | 15 ++-
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/changes/bug18761 b/changes/bug18761
new file mode 100644
index 000..78500a8
--- /dev/null
+++ b/changes/bug18761
@@ -0,0 +1,3 @@
+  o Minor feature (logging):
+- When rejecting a misformed INTRODUCE2 cell, only log at PROTOCOL_WARN
+  severity. Closes ticket 18761.
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 39e5831..6f41f3b 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -1445,6 +1445,7 @@ rend_service_receive_introduction(origin_circuit_t 
*circuit,
   int status = 0, result;
   const or_options_t *options = get_options();
   char *err_msg = NULL;
+  int err_msg_severity = LOG_WARN;
   const char *stage_descr = NULL;
   int reason = END_CIRC_REASON_TORPROTOCOL;
   /* Service/circuit/key stuff we can learn before parsing */
@@ -1596,8 +1597,10 @@ rend_service_receive_introduction(origin_circuit_t 
*circuit,
 
   /* Find the rendezvous point */
   rp = find_rp_for_intro(parsed_req, _msg);
-  if (!rp)
+  if (!rp) {
+err_msg_severity = LOG_PROTOCOL_WARN;
 goto log_error;
+  }
 
   /* Check if we'd refuse to talk to this router */
   if (options->StrictNodes &&
@@ -1735,7 +1738,7 @@ rend_service_receive_introduction(origin_circuit_t 
*circuit,
 }
   }
 
-  log_warn(LD_REND, "%s on circ %u", err_msg,
+  log_fn(err_msg_severity, LD_REND, "%s on circ %u", err_msg,
(unsigned)circuit->base_.n_circ_id);
  err:
   status = -1;
@@ -1797,7 +1800,7 @@ find_rp_for_intro(const rend_intro_cell_t *intro,
 if (!rp) {
   if (err_msg_out) {
 tor_asprintf(_msg,
- "Could build extend_info_t for router %s named "
+ "Couldn't build extend_info_t for router %s named "
  "in INTRODUCE2 cell",
  escaped_safe_str_client(rp_nickname));
   }
@@ -1833,8 +1836,10 @@ find_rp_for_intro(const rend_intro_cell_t *intro,
   goto done;
 
  err:
-  if (err_msg_out) *err_msg_out = err_msg;
-  else tor_free(err_msg);
+  if (err_msg_out)
+*err_msg_out = err_msg;
+  else
+tor_free(err_msg);
 
  done:
   return rp;



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'bug18761_028_squashed' into maint-0.2.8

2016-05-11 Thread nickm
commit 28e1aa111803bc3548e00503ab56de5f3d41c7fc
Merge: e71dfb6 b59d791
Author: Nick Mathewson 
Date:   Wed May 11 12:36:27 2016 -0400

Merge branch 'bug18761_028_squashed' into maint-0.2.8

 changes/bug18761 |  3 +++
 src/or/rendservice.c | 15 ++-
 2 files changed, 13 insertions(+), 5 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.8] Merge branch 'bug18761_028_squashed' into maint-0.2.8

2016-05-11 Thread nickm
commit 28e1aa111803bc3548e00503ab56de5f3d41c7fc
Merge: e71dfb6 b59d791
Author: Nick Mathewson 
Date:   Wed May 11 12:36:27 2016 -0400

Merge branch 'bug18761_028_squashed' into maint-0.2.8

 changes/bug18761 |  3 +++
 src/or/rendservice.c | 15 ++-
 2 files changed, 13 insertions(+), 5 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Switch between fallback and authority when auth cert fetch fails

2016-05-11 Thread nickm
commit 92d7ee08b8c51b4b29f68c6d00ca4aa91ea5a66b
Author: teor (Tim Wilson-Brown) 
Date:   Wed May 4 15:41:37 2016 +1000

Switch between fallback and authority when auth cert fetch fails
---
 changes/bug18816|  2 ++
 src/or/routerlist.c | 14 ++
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/changes/bug18816 b/changes/bug18816
index 7265f5a..0545512 100644
--- a/changes/bug18816
+++ b/changes/bug18816
@@ -1,4 +1,6 @@
   o Minor bugfix (bootstrap):
 - Consistently use the consensus download schedule for
   authority certificates.
+- When downloading authority certificates fails, switch from
+  using a fallback to using an authority.
   Resolves ticket 18816; fix on fddb814fe in 0.2.4.13-alpha.
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 85e9e7d..3169343 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -912,11 +912,14 @@ authority_certs_fetch_missing(networkstatus_t *status, 
time_t now)
 } SMARTLIST_FOREACH_END(d);
 
 if (smartlist_len(fps) > 1) {
+  static int want_auth = 0;
   resource = smartlist_join_strings(fps, "", 0, NULL);
-  /* XXX - do we want certs from authorities or mirrors? - teor */
   directory_get_from_dirserver(DIR_PURPOSE_FETCH_CERTIFICATE, 0,
resource, PDS_RETRY_IF_NO_SERVERS,
-   DL_WANT_ANY_DIRSERVER);
+   want_auth ? DL_WANT_AUTHORITY
+ : DL_WANT_ANY_DIRSERVER);
+  /* on failure, swap between using fallbacks and authorities */
+  want_auth = !want_auth;
   tor_free(resource);
 }
 /* else we didn't add any: they were all pending */
@@ -958,11 +961,14 @@ authority_certs_fetch_missing(networkstatus_t *status, 
time_t now)
 } SMARTLIST_FOREACH_END(d);
 
 if (smartlist_len(fp_pairs) > 1) {
+  static int want_auth = 0;
   resource = smartlist_join_strings(fp_pairs, "", 0, NULL);
-  /* XXX - do we want certs from authorities or mirrors? - teor */
   directory_get_from_dirserver(DIR_PURPOSE_FETCH_CERTIFICATE, 0,
resource, PDS_RETRY_IF_NO_SERVERS,
-   DL_WANT_ANY_DIRSERVER);
+   want_auth ? DL_WANT_AUTHORITY
+ : DL_WANT_ANY_DIRSERVER);
+  /* on failure, swap between using fallbacks and authorities */
+  want_auth = !want_auth;
   tor_free(resource);
 }
 /* else they were all pending */



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.2.8'

2016-05-11 Thread nickm
commit 79f9e63ebf2bbe855af381cb49d5fbeb47ec0880
Merge: e31980f e71dfb6
Author: Nick Mathewson 
Date:   Wed May 11 12:30:18 2016 -0400

Merge branch 'maint-0.2.8'

 changes/bug18816|  6 ++
 src/or/routerlist.c | 35 +--
 2 files changed, 35 insertions(+), 6 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge remote-tracking branch 'teor/bug18816-squashed' into maint-0.2.8

2016-05-11 Thread nickm
commit e71dfb6344c0480523a1fef0a77bd3d270d62e26
Merge: 50249c7 92d7ee0
Author: Nick Mathewson 
Date:   Wed May 11 12:28:37 2016 -0400

Merge remote-tracking branch 'teor/bug18816-squashed' into maint-0.2.8

 changes/bug18816|  6 ++
 src/or/routerlist.c | 35 +--
 2 files changed, 35 insertions(+), 6 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.7] Undefine _FORTIFY_SOURCE before defining it.

2016-05-11 Thread nickm
commit c662bef45595e40106becfbdbb39811300d15a7f
Author: Nick Mathewson 
Date:   Wed May 11 12:15:37 2016 -0400

Undefine _FORTIFY_SOURCE before defining it.

This makes our compilation options checks in autoconf work better on
systems that already define _FORTIFY_SOURCE.

Fixes at least one case of bug 18841; bugfix on 0.2.3.17-beta. Patch
from "trudokal".
---
 changes/bug18841.1 | 7 +++
 configure.ac   | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/changes/bug18841.1 b/changes/bug18841.1
new file mode 100644
index 000..205ee5a
--- /dev/null
+++ b/changes/bug18841.1
@@ -0,0 +1,7 @@
+  o Major bugfixes (compilation):
+- Correctly detect compiler flags on systems where _FORTIFY_SOURCE
+  is predefined. Previously, our use of -D_FORTIFY_SOURCE would
+  cause a compiler warning, thereby making other checks fail.
+  Fixes one case of bug 18841; bugfix on 0.2.3.17-beta. Patch from
+  "trudokal".
+
diff --git a/configure.ac b/configure.ac
index 29ba2fd..2116b41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -623,7 +623,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
 #endif])], have_clang=yes, have_clang=no)
 
 if test x$enable_gcc_hardening != xno; then
-CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
+CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
 if test x$have_clang = xyes; then
 TOR_CHECK_CFLAGS(-Qunused-arguments)
 fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Use the consensus download schedule for authority certificates

2016-05-11 Thread nickm
commit 64b948f5fa0099ddabcf0c63e437cc8e7373ef38
Author: teor (Tim Wilson-Brown) 
Date:   Wed May 4 13:05:18 2016 +1000

Use the consensus download schedule for authority certificates

Previously, we were using the generic schedule for some downloads,
and the consensus schedule for others.

Resolves ticket 18816; fix on fddb814fe in 0.2.4.13-alpha.
---
 changes/bug18816|  4 
 src/or/routerlist.c | 21 +++--
 2 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/changes/bug18816 b/changes/bug18816
new file mode 100644
index 000..7265f5a
--- /dev/null
+++ b/changes/bug18816
@@ -0,0 +1,4 @@
+  o Minor bugfix (bootstrap):
+- Consistently use the consensus download schedule for
+  authority certificates.
+  Resolves ticket 18816; fix on fddb814fe in 0.2.4.13-alpha.
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 1c275a6..85e9e7d 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -148,6 +148,22 @@ get_n_authorities(dirinfo_type_t type)
   return n;
 }
 
+/** Initialise schedule, want_authority, and increment on in the download
+ * status dlstatus, then call download_status_reset() on it.
+ * It is safe to call this function or download_status_reset() multiple times
+ * on a new dlstatus. But it should *not* be called after a dlstatus has been
+ * used to count download attempts or failures. */
+static void
+download_status_cert_init(download_status_t *dlstatus)
+{
+  dlstatus->schedule = DL_SCHED_CONSENSUS;
+  dlstatus->want_authority = DL_WANT_ANY_DIRSERVER;
+  dlstatus->increment_on = DL_SCHED_INCREMENT_FAILURE;
+
+  /* Use the new schedule to set next_attempt_at */
+  download_status_reset(dlstatus);
+}
+
 /** Reset the download status of a specified element in a dsmap */
 static void
 download_status_reset_by_sk_in_cl(cert_list_t *cl, const char *digest)
@@ -168,6 +184,7 @@ download_status_reset_by_sk_in_cl(cert_list_t *cl, const 
char *digest)
 /* Insert before we reset */
 dlstatus = tor_malloc_zero(sizeof(*dlstatus));
 dsmap_set(cl->dl_status_map, digest, dlstatus);
+download_status_cert_init(dlstatus);
   }
   tor_assert(dlstatus);
   /* Go ahead and reset it */
@@ -206,7 +223,7 @@ download_status_is_ready_by_sk_in_cl(cert_list_t *cl,
  * too.
  */
 dlstatus = tor_malloc_zero(sizeof(*dlstatus));
-download_status_reset(dlstatus);
+download_status_cert_init(dlstatus);
 dsmap_set(cl->dl_status_map, digest, dlstatus);
 rv = 1;
   }
@@ -225,7 +242,7 @@ get_cert_list(const char *id_digest)
   cl = digestmap_get(trusted_dir_certs, id_digest);
   if (!cl) {
 cl = tor_malloc_zero(sizeof(cert_list_t));
-cl->dl_status_by_id.schedule = DL_SCHED_CONSENSUS;
+download_status_cert_init(>dl_status_by_id);
 cl->certs = smartlist_new();
 cl->dl_status_map = dsmap_new();
 digestmap_set(trusted_dir_certs, id_digest, cl);



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.8] Merge remote-tracking branch 'teor/bug18816-squashed' into maint-0.2.8

2016-05-11 Thread nickm
commit e71dfb6344c0480523a1fef0a77bd3d270d62e26
Merge: 50249c7 92d7ee0
Author: Nick Mathewson 
Date:   Wed May 11 12:28:37 2016 -0400

Merge remote-tracking branch 'teor/bug18816-squashed' into maint-0.2.8

 changes/bug18816|  6 ++
 src/or/routerlist.c | 35 +--
 2 files changed, 35 insertions(+), 6 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.8] Switch between fallback and authority when auth cert fetch fails

2016-05-11 Thread nickm
commit 92d7ee08b8c51b4b29f68c6d00ca4aa91ea5a66b
Author: teor (Tim Wilson-Brown) 
Date:   Wed May 4 15:41:37 2016 +1000

Switch between fallback and authority when auth cert fetch fails
---
 changes/bug18816|  2 ++
 src/or/routerlist.c | 14 ++
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/changes/bug18816 b/changes/bug18816
index 7265f5a..0545512 100644
--- a/changes/bug18816
+++ b/changes/bug18816
@@ -1,4 +1,6 @@
   o Minor bugfix (bootstrap):
 - Consistently use the consensus download schedule for
   authority certificates.
+- When downloading authority certificates fails, switch from
+  using a fallback to using an authority.
   Resolves ticket 18816; fix on fddb814fe in 0.2.4.13-alpha.
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 85e9e7d..3169343 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -912,11 +912,14 @@ authority_certs_fetch_missing(networkstatus_t *status, 
time_t now)
 } SMARTLIST_FOREACH_END(d);
 
 if (smartlist_len(fps) > 1) {
+  static int want_auth = 0;
   resource = smartlist_join_strings(fps, "", 0, NULL);
-  /* XXX - do we want certs from authorities or mirrors? - teor */
   directory_get_from_dirserver(DIR_PURPOSE_FETCH_CERTIFICATE, 0,
resource, PDS_RETRY_IF_NO_SERVERS,
-   DL_WANT_ANY_DIRSERVER);
+   want_auth ? DL_WANT_AUTHORITY
+ : DL_WANT_ANY_DIRSERVER);
+  /* on failure, swap between using fallbacks and authorities */
+  want_auth = !want_auth;
   tor_free(resource);
 }
 /* else we didn't add any: they were all pending */
@@ -958,11 +961,14 @@ authority_certs_fetch_missing(networkstatus_t *status, 
time_t now)
 } SMARTLIST_FOREACH_END(d);
 
 if (smartlist_len(fp_pairs) > 1) {
+  static int want_auth = 0;
   resource = smartlist_join_strings(fp_pairs, "", 0, NULL);
-  /* XXX - do we want certs from authorities or mirrors? - teor */
   directory_get_from_dirserver(DIR_PURPOSE_FETCH_CERTIFICATE, 0,
resource, PDS_RETRY_IF_NO_SERVERS,
-   DL_WANT_ANY_DIRSERVER);
+   want_auth ? DL_WANT_AUTHORITY
+ : DL_WANT_ANY_DIRSERVER);
+  /* on failure, swap between using fallbacks and authorities */
+  want_auth = !want_auth;
   tor_free(resource);
 }
 /* else they were all pending */



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.8] Use the consensus download schedule for authority certificates

2016-05-11 Thread nickm
commit 64b948f5fa0099ddabcf0c63e437cc8e7373ef38
Author: teor (Tim Wilson-Brown) 
Date:   Wed May 4 13:05:18 2016 +1000

Use the consensus download schedule for authority certificates

Previously, we were using the generic schedule for some downloads,
and the consensus schedule for others.

Resolves ticket 18816; fix on fddb814fe in 0.2.4.13-alpha.
---
 changes/bug18816|  4 
 src/or/routerlist.c | 21 +++--
 2 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/changes/bug18816 b/changes/bug18816
new file mode 100644
index 000..7265f5a
--- /dev/null
+++ b/changes/bug18816
@@ -0,0 +1,4 @@
+  o Minor bugfix (bootstrap):
+- Consistently use the consensus download schedule for
+  authority certificates.
+  Resolves ticket 18816; fix on fddb814fe in 0.2.4.13-alpha.
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 1c275a6..85e9e7d 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -148,6 +148,22 @@ get_n_authorities(dirinfo_type_t type)
   return n;
 }
 
+/** Initialise schedule, want_authority, and increment on in the download
+ * status dlstatus, then call download_status_reset() on it.
+ * It is safe to call this function or download_status_reset() multiple times
+ * on a new dlstatus. But it should *not* be called after a dlstatus has been
+ * used to count download attempts or failures. */
+static void
+download_status_cert_init(download_status_t *dlstatus)
+{
+  dlstatus->schedule = DL_SCHED_CONSENSUS;
+  dlstatus->want_authority = DL_WANT_ANY_DIRSERVER;
+  dlstatus->increment_on = DL_SCHED_INCREMENT_FAILURE;
+
+  /* Use the new schedule to set next_attempt_at */
+  download_status_reset(dlstatus);
+}
+
 /** Reset the download status of a specified element in a dsmap */
 static void
 download_status_reset_by_sk_in_cl(cert_list_t *cl, const char *digest)
@@ -168,6 +184,7 @@ download_status_reset_by_sk_in_cl(cert_list_t *cl, const 
char *digest)
 /* Insert before we reset */
 dlstatus = tor_malloc_zero(sizeof(*dlstatus));
 dsmap_set(cl->dl_status_map, digest, dlstatus);
+download_status_cert_init(dlstatus);
   }
   tor_assert(dlstatus);
   /* Go ahead and reset it */
@@ -206,7 +223,7 @@ download_status_is_ready_by_sk_in_cl(cert_list_t *cl,
  * too.
  */
 dlstatus = tor_malloc_zero(sizeof(*dlstatus));
-download_status_reset(dlstatus);
+download_status_cert_init(dlstatus);
 dsmap_set(cl->dl_status_map, digest, dlstatus);
 rv = 1;
   }
@@ -225,7 +242,7 @@ get_cert_list(const char *id_digest)
   cl = digestmap_get(trusted_dir_certs, id_digest);
   if (!cl) {
 cl = tor_malloc_zero(sizeof(cert_list_t));
-cl->dl_status_by_id.schedule = DL_SCHED_CONSENSUS;
+download_status_cert_init(>dl_status_by_id);
 cl->certs = smartlist_new();
 cl->dl_status_map = dsmap_new();
 digestmap_set(trusted_dir_certs, id_digest, cl);



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.2.7' into maint-0.2.8

2016-05-11 Thread nickm
commit 50249c7cd97c982fe829a9e7a22e660658b4e217
Merge: 5cd5979 039fc84
Author: Nick Mathewson 
Date:   Wed May 11 12:23:20 2016 -0400

Merge branch 'maint-0.2.7' into maint-0.2.8

 changes/bug18841.1 | 7 +++
 configure.ac   | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --cc configure.ac
index e4816fd,8107c90..a487948
--- a/configure.ac
+++ b/configure.ac
@@@ -760,9 -717,9 +760,9 @@@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], 
  #error
  #endif])], have_clang=yes, have_clang=no)
  
 -if test x$enable_gcc_hardening != xno; then
 +if test "x$enable_gcc_hardening" != "xno"; then
- CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
+ CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
 -if test x$have_clang = xyes; then
 +if test "x$have_clang" = "xyes"; then
  TOR_CHECK_CFLAGS(-Qunused-arguments)
  fi
  TOR_CHECK_CFLAGS(-fstack-protector-all, also_link)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'bug18841_1_025' into maint-0.2.7

2016-05-11 Thread nickm
commit 039fc8427a512efce87b7bd21c10c4adca4ba30d
Merge: 61c0bae c662bef
Author: Nick Mathewson 
Date:   Wed May 11 12:22:36 2016 -0400

Merge branch 'bug18841_1_025' into maint-0.2.7

 changes/bug18841.1 | 7 +++
 configure.ac   | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.2.8'

2016-05-11 Thread nickm
commit e31980f693b569541aded815a504eb62a76649d9
Merge: 84af12e 50249c7
Author: Nick Mathewson 
Date:   Wed May 11 12:23:40 2016 -0400

Merge branch 'maint-0.2.8'

 changes/bug18841.1 | 7 +++
 configure.ac   | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.7] Merge branch 'bug18841_1_025' into maint-0.2.7

2016-05-11 Thread nickm
commit 039fc8427a512efce87b7bd21c10c4adca4ba30d
Merge: 61c0bae c662bef
Author: Nick Mathewson 
Date:   Wed May 11 12:22:36 2016 -0400

Merge branch 'bug18841_1_025' into maint-0.2.7

 changes/bug18841.1 | 7 +++
 configure.ac   | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Undefine _FORTIFY_SOURCE before defining it.

2016-05-11 Thread nickm
commit c662bef45595e40106becfbdbb39811300d15a7f
Author: Nick Mathewson 
Date:   Wed May 11 12:15:37 2016 -0400

Undefine _FORTIFY_SOURCE before defining it.

This makes our compilation options checks in autoconf work better on
systems that already define _FORTIFY_SOURCE.

Fixes at least one case of bug 18841; bugfix on 0.2.3.17-beta. Patch
from "trudokal".
---
 changes/bug18841.1 | 7 +++
 configure.ac   | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/changes/bug18841.1 b/changes/bug18841.1
new file mode 100644
index 000..205ee5a
--- /dev/null
+++ b/changes/bug18841.1
@@ -0,0 +1,7 @@
+  o Major bugfixes (compilation):
+- Correctly detect compiler flags on systems where _FORTIFY_SOURCE
+  is predefined. Previously, our use of -D_FORTIFY_SOURCE would
+  cause a compiler warning, thereby making other checks fail.
+  Fixes one case of bug 18841; bugfix on 0.2.3.17-beta. Patch from
+  "trudokal".
+
diff --git a/configure.ac b/configure.ac
index 29ba2fd..2116b41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -623,7 +623,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
 #endif])], have_clang=yes, have_clang=no)
 
 if test x$enable_gcc_hardening != xno; then
-CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
+CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
 if test x$have_clang = xyes; then
 TOR_CHECK_CFLAGS(-Qunused-arguments)
 fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.8] Merge branch 'bug18841_1_025' into maint-0.2.7

2016-05-11 Thread nickm
commit 039fc8427a512efce87b7bd21c10c4adca4ba30d
Merge: 61c0bae c662bef
Author: Nick Mathewson 
Date:   Wed May 11 12:22:36 2016 -0400

Merge branch 'bug18841_1_025' into maint-0.2.7

 changes/bug18841.1 | 7 +++
 configure.ac   | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.8] Merge branch 'maint-0.2.7' into maint-0.2.8

2016-05-11 Thread nickm
commit 50249c7cd97c982fe829a9e7a22e660658b4e217
Merge: 5cd5979 039fc84
Author: Nick Mathewson 
Date:   Wed May 11 12:23:20 2016 -0400

Merge branch 'maint-0.2.7' into maint-0.2.8

 changes/bug18841.1 | 7 +++
 configure.ac   | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --cc configure.ac
index e4816fd,8107c90..a487948
--- a/configure.ac
+++ b/configure.ac
@@@ -760,9 -717,9 +760,9 @@@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], 
  #error
  #endif])], have_clang=yes, have_clang=no)
  
 -if test x$enable_gcc_hardening != xno; then
 +if test "x$enable_gcc_hardening" != "xno"; then
- CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
+ CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
 -if test x$have_clang = xyes; then
 +if test "x$have_clang" = "xyes"; then
  TOR_CHECK_CFLAGS(-Qunused-arguments)
  fi
  TOR_CHECK_CFLAGS(-fstack-protector-all, also_link)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.8] Undefine _FORTIFY_SOURCE before defining it.

2016-05-11 Thread nickm
commit c662bef45595e40106becfbdbb39811300d15a7f
Author: Nick Mathewson 
Date:   Wed May 11 12:15:37 2016 -0400

Undefine _FORTIFY_SOURCE before defining it.

This makes our compilation options checks in autoconf work better on
systems that already define _FORTIFY_SOURCE.

Fixes at least one case of bug 18841; bugfix on 0.2.3.17-beta. Patch
from "trudokal".
---
 changes/bug18841.1 | 7 +++
 configure.ac   | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/changes/bug18841.1 b/changes/bug18841.1
new file mode 100644
index 000..205ee5a
--- /dev/null
+++ b/changes/bug18841.1
@@ -0,0 +1,7 @@
+  o Major bugfixes (compilation):
+- Correctly detect compiler flags on systems where _FORTIFY_SOURCE
+  is predefined. Previously, our use of -D_FORTIFY_SOURCE would
+  cause a compiler warning, thereby making other checks fail.
+  Fixes one case of bug 18841; bugfix on 0.2.3.17-beta. Patch from
+  "trudokal".
+
diff --git a/configure.ac b/configure.ac
index 29ba2fd..2116b41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -623,7 +623,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
 #endif])], have_clang=yes, have_clang=no)
 
 if test x$enable_gcc_hardening != xno; then
-CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
+CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
 if test x$have_clang = xyes; then
 TOR_CHECK_CFLAGS(-Qunused-arguments)
 fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/https_everywhere_completed] Update translations for https_everywhere_completed

2016-05-11 Thread translation
commit e0da985eac51245f033a7b10eee0a09e43f79946
Author: Translation commit bot 
Date:   Wed May 11 16:15:20 2016 +

Update translations for https_everywhere_completed
---
 ca/ssl-observatory.dtd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ca/ssl-observatory.dtd b/ca/ssl-observatory.dtd
index dc44b2e..afbccbe 100644
--- a/ca/ssl-observatory.dtd
+++ b/ca/ssl-observatory.dtd
@@ -39,7 +39,7 @@ xarxa corporativa molt intrusiva.">
 "Aquesta opció requereix que Tor estigui instal·lat i en funcionament">
 
 
+"Quan vegis un certificat nou, avisa a l'Observatori al qual estigui 
connectada el teu ISP.">
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/https_everywhere] Update translations for https_everywhere

2016-05-11 Thread translation
commit b39fc53839777fdcf6b6eb0bd1a4c2544d59f769
Author: Translation commit bot 
Date:   Wed May 11 16:15:16 2016 +

Update translations for https_everywhere
---
 ca/ssl-observatory.dtd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ca/ssl-observatory.dtd b/ca/ssl-observatory.dtd
index dc44b2e..afbccbe 100644
--- a/ca/ssl-observatory.dtd
+++ b/ca/ssl-observatory.dtd
@@ -39,7 +39,7 @@ xarxa corporativa molt intrusiva.">
 "Aquesta opció requereix que Tor estigui instal·lat i en funcionament">
 
 
+"Quan vegis un certificat nou, avisa a l'Observatori al qual estigui 
connectada el teu ISP.">
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/abouttor-homepage] Update translations for abouttor-homepage

2016-05-11 Thread translation
commit 290753bea26e3c1154f6ad14b2817bcec41a1a21
Author: Translation commit bot 
Date:   Wed May 11 15:45:44 2016 +

Update translations for abouttor-homepage
---
 ca/aboutTor.dtd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ca/aboutTor.dtd b/ca/aboutTor.dtd
index da9f699..dbcd0ff 100644
--- a/ca/aboutTor.dtd
+++ b/ca/aboutTor.dtd
@@ -37,7 +37,7 @@
 https://www.torproject.org/download/download.html.en#warning;>
 
 
-
+
 https://www.torproject.org/docs/tor-doc-relay.html.en;>
 
 https://www.torproject.org/getinvolved/volunteer.html.en;>

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/abouttor-homepage_completed] Update translations for abouttor-homepage_completed

2016-05-11 Thread translation
commit c8cd4e5730dddf414ce85df2ec9c95fc2bf29a3d
Author: Translation commit bot 
Date:   Wed May 11 15:45:49 2016 +

Update translations for abouttor-homepage_completed
---
 ca/aboutTor.dtd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ca/aboutTor.dtd b/ca/aboutTor.dtd
index da9f699..dbcd0ff 100644
--- a/ca/aboutTor.dtd
+++ b/ca/aboutTor.dtd
@@ -37,7 +37,7 @@
 https://www.torproject.org/download/download.html.en#warning;>
 
 
-
+
 https://www.torproject.org/docs/tor-doc-relay.html.en;>
 
 https://www.torproject.org/getinvolved/volunteer.html.en;>

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [snowflake/master] Return after bad request

2016-05-11 Thread arlo
commit bdbabe5e0c0cdc651a8c23262759074625d9d554
Author: Arlo Breault 
Date:   Wed May 11 07:27:42 2016 -0700

Return after bad request
---
 broker/broker.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/broker/broker.go b/broker/broker.go
index ffeabdd..3c50ac9 100644
--- a/broker/broker.go
+++ b/broker/broker.go
@@ -118,8 +118,10 @@ func proxyPolls(ctx *BrokerContext, w http.ResponseWriter, 
r *http.Request) {
w.WriteHeader(http.StatusBadRequest)
return
}
-   if string(body) != id { // Mismatched IDs!
+   if string(body) != id {
+   log.Println("Mismatched IDs!")
w.WriteHeader(http.StatusBadRequest)
+   return
}
log.Println("Received snowflake: ", id)
// Wait for a client to avail an offer to the snowflake, or timeout if 
nil.
@@ -162,7 +164,6 @@ func clientOffers(ctx *BrokerContext, w 
http.ResponseWriter, r *http.Request) {
case answer := <-snowflake.answerChannel:
log.Println("Client: Retrieving answer")
w.Write(answer)
-
case <-time.After(time.Second * ClientTimeout):
log.Println("Client: Timed out.")
w.WriteHeader(http.StatusGatewayTimeout)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-launcher-network-settings] Update translations for tor-launcher-network-settings

2016-05-11 Thread translation
commit a31c0f4b92d3b9560af19a1a304ef19c3b412bd7
Author: Translation commit bot 
Date:   Wed May 11 14:15:39 2016 +

Update translations for tor-launcher-network-settings
---
 es_AR/network-settings.dtd | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/es_AR/network-settings.dtd b/es_AR/network-settings.dtd
index 820b60e..49e95dd 100644
--- a/es_AR/network-settings.dtd
+++ b/es_AR/network-settings.dtd
@@ -12,23 +12,23 @@
 
 
 
-
+
 
 
-
+
 
 
 
-
-
+
+
 
-
-
-
-
-
-
-
+
+
+
+
+
+
+
 
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-misc] Update translations for tails-misc

2016-05-11 Thread translation
commit 2994218b28d2e3b0b3cca3e93ecbed9d3c1faee4
Author: Translation commit bot 
Date:   Wed May 11 13:45:44 2016 +

Update translations for tails-misc
---
 es_AR.po | 17 +
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/es_AR.po b/es_AR.po
index 20a6dde..d60966e 100644
--- a/es_AR.po
+++ b/es_AR.po
@@ -5,13 +5,14 @@
 # Translators:
 # ezemelano , 2014
 # Pablo Di Noto , 2016
+# psss , 2016
 msgid ""
 msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2016-04-25 14:02+0200\n"
-"PO-Revision-Date: 2016-04-26 09:06+\n"
-"Last-Translator: carolyn \n"
+"PO-Revision-Date: 2016-05-11 13:43+\n"
+"Last-Translator: psss \n"
 "Language-Team: Spanish (Argentina) 
(http://www.transifex.com/otf/torproject/language/es_AR/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -244,7 +245,7 @@ msgid ""
 "If you already migrated your emails to Icedove, you should delete"
 " all your Claws Mail data to remove this warning."
-msgstr ""
+msgstr "Si ya migraste tus correos a Icedove, debes borrar
 todos los datos de Claws Mail  para que esta alarma desaparezca."
 
 #: 
config/chroot_local-includes/usr/share/gnome-shell/extensions/shutdown-hel...@tails.boum.org/extension.js:71
 msgid "Restart"
@@ -532,7 +533,7 @@ msgstr ""
 
 #: 
../config/chroot_local-includes/usr/share/applications/i2p-browser.desktop.in.h:2
 msgid "I2P Browser"
-msgstr ""
+msgstr "Navegadro I2P"
 
 #: 
../config/chroot_local-includes/usr/share/applications/tails-about.desktop.in.h:2
 msgid "Learn more about Tails"
@@ -556,16 +557,16 @@ msgstr "Proyecto Tor"
 
 #: 
../config/chroot_local-includes/usr/share/applications/tor-browser.desktop.in.h:2
 msgid "Anonymous Web Browser"
-msgstr ""
+msgstr "Navegador anonimo"
 
 #: 
../config/chroot_local-includes/usr/share/applications/unsafe-browser.desktop.in.h:2
 msgid "Browse the World Wide Web without anonymity"
-msgstr ""
+msgstr "Navegar las web sin anonimato "
 
 #: 
../config/chroot_local-includes/usr/share/applications/unsafe-browser.desktop.in.h:3
 msgid "Unsafe Web Browser"
-msgstr ""
+msgstr "Navegador web inseguro"
 
 #: 
../config/chroot_local-includes/usr/share/desktop-directories/Tails.directory.in.h:2
 msgid "Tails specific tools"
-msgstr ""
+msgstr "Herraminetas especificas de Tails"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-launcher-network-settings] Update translations for tor-launcher-network-settings

2016-05-11 Thread translation
commit 5cc034646e8f7bec23a01d690680e447a5153c1b
Author: Translation commit bot 
Date:   Wed May 11 13:45:40 2016 +

Update translations for tor-launcher-network-settings
---
 es_AR/network-settings.dtd | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/es_AR/network-settings.dtd b/es_AR/network-settings.dtd
index 43e6c10..820b60e 100644
--- a/es_AR/network-settings.dtd
+++ b/es_AR/network-settings.dtd
@@ -1,12 +1,12 @@
 
 
 
-
-
+
+
 
 
 
-
+
 
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits