[tor-commits] [tor/release-0.3.3] Merge remote-tracking branch 'catalyst-github/bug25629-032' into maint-0.3.2

2018-03-27 Thread nickm
commit 0b795ce6de339ccdabe17cb78f632df6f74901e2
Merge: 5e7d50585 0c13a84c0
Author: Nick Mathewson 
Date:   Tue Mar 27 18:24:59 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25629-032' into maint-0.3.2

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 deletions(-)



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


[tor-commits] [tor/release-0.3.3] Merge branch 'maint-0.3.3' into release-0.3.3

2018-03-27 Thread nickm
commit f2027d5bf8bc70738b14d50e7a694dfd1a47d69a
Merge: d5580d9a2 ddee28a3c
Author: Nick Mathewson 
Date:   Tue Mar 27 18:25:52 2018 -0400

Merge branch 'maint-0.3.3' into release-0.3.3

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 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 CID 1430932

2018-03-27 Thread nickm
commit 4bb7d9fd1241a3c263636efa03ee8c62ab744515
Author: Taylor Yu 
Date:   Mon Mar 26 17:51:50 2018 -0500

Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.
---
 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/changes/bug25629 b/changes/bug25629
new file mode 100644
index 0..190928a94
--- /dev/null
+++ b/changes/bug25629
@@ -0,0 +1,3 @@
+  o Minor bugfixes (C correctness):
+- Fix a very unlikely null pointer dereference.  Fixes bug 25629;
+  bugfix on 0.2.9.15.  Found by Coverity; this is CID 1430932.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 5a02648c5..26f990b08 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -263,13 +263,12 @@ nodelist_add_microdesc(microdesc_t *md)
   if (rs == NULL)
 return NULL;
   node = node_get_mutable_by_id(rs->identity_digest);
-  if (node) {
-if (node->md)
-  node->md->held_by_nodes--;
-node->md = md;
-md->held_by_nodes++;
-  }
-
+  if (node == NULL)
+return NULL;
+  if (node->md)
+node->md->held_by_nodes--;
+  node->md = md;
+  md->held_by_nodes++;
   node_add_to_address_set(node);
 
   return node;



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


[tor-commits] [tor/release-0.3.3] Fix CID 1430932

2018-03-27 Thread nickm
commit 0c13a84c0d9282e597227d117e23216bb459caad
Author: Taylor Yu 
Date:   Mon Mar 26 18:05:16 2018 -0500

Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.
---
 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/changes/bug25629 b/changes/bug25629
new file mode 100644
index 0..190928a94
--- /dev/null
+++ b/changes/bug25629
@@ -0,0 +1,3 @@
+  o Minor bugfixes (C correctness):
+- Fix a very unlikely null pointer dereference.  Fixes bug 25629;
+  bugfix on 0.2.9.15.  Found by Coverity; this is CID 1430932.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 9a477ecf4..ac9449855 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -525,22 +525,22 @@ nodelist_add_microdesc(microdesc_t *md)
   if (rs == NULL)
 return NULL;
   node = node_get_mutable_by_id(rs->identity_digest);
-  if (node) {
-node_remove_from_ed25519_map(node);
-if (node->md)
-  node->md->held_by_nodes--;
+  if (node == NULL)
+return NULL;
 
-node->md = md;
-md->held_by_nodes++;
-/* Setting the HSDir index requires the ed25519 identity key which can
- * only be found either in the ri or md. This is why this is called here.
- * Only nodes supporting HSDir=2 protocol version needs this index. */
-if (rs->supports_v3_hsdir) {
-  node_set_hsdir_index(node, ns);
-}
-node_add_to_ed25519_map(node);
-  }
+  node_remove_from_ed25519_map(node);
+  if (node->md)
+node->md->held_by_nodes--;
 
+  node->md = md;
+  md->held_by_nodes++;
+  /* Setting the HSDir index requires the ed25519 identity key which can
+   * only be found either in the ri or md. This is why this is called here.
+   * Only nodes supporting HSDir=2 protocol version needs this index. */
+  if (rs->supports_v3_hsdir) {
+node_set_hsdir_index(node, ns);
+  }
+  node_add_to_ed25519_map(node);
   node_add_to_address_set(node);
 
   return node;



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


[tor-commits] [tor/release-0.3.3] Fix CID 1430932

2018-03-27 Thread nickm
commit 471f28a2a85b8db8315f518aff456440f9791877
Author: Taylor Yu 
Date:   Mon Mar 26 19:29:59 2018 -0500

Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.
---
 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/changes/bug25629 b/changes/bug25629
new file mode 100644
index 0..190928a94
--- /dev/null
+++ b/changes/bug25629
@@ -0,0 +1,3 @@
+  o Minor bugfixes (C correctness):
+- Fix a very unlikely null pointer dereference.  Fixes bug 25629;
+  bugfix on 0.2.9.15.  Found by Coverity; this is CID 1430932.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 391b31d68..125dd8b9f 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -507,22 +507,22 @@ nodelist_add_microdesc(microdesc_t *md)
   if (rs == NULL)
 return NULL;
   node = node_get_mutable_by_id(rs->identity_digest);
-  if (node) {
-node_remove_from_ed25519_map(node);
-if (node->md)
-  node->md->held_by_nodes--;
+  if (node == NULL)
+return NULL;
 
-node->md = md;
-md->held_by_nodes++;
-/* Setting the HSDir index requires the ed25519 identity key which can
- * only be found either in the ri or md. This is why this is called here.
- * Only nodes supporting HSDir=2 protocol version needs this index. */
-if (rs->pv.supports_v3_hsdir) {
-  node_set_hsdir_index(node, ns);
-}
-node_add_to_ed25519_map(node);
-  }
+  node_remove_from_ed25519_map(node);
+  if (node->md)
+node->md->held_by_nodes--;
 
+  node->md = md;
+  md->held_by_nodes++;
+  /* Setting the HSDir index requires the ed25519 identity key which can
+   * only be found either in the ri or md. This is why this is called here.
+   * Only nodes supporting HSDir=2 protocol version needs this index. */
+  if (rs->pv.supports_v3_hsdir) {
+node_set_hsdir_index(node, ns);
+  }
+  node_add_to_ed25519_map(node);
   node_add_to_address_set(node);
 
   return node;



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


[tor-commits] [tor/release-0.3.2] Merge branch 'maint-0.3.1' into maint-0.3.2

2018-03-27 Thread nickm
commit 5e7d505850607a16f6051a19ff60c39ff4c8393e
Merge: b5a6c0399 5acfc3087
Author: Nick Mathewson 
Date:   Tue Mar 27 18:24:37 2018 -0400

Merge branch 'maint-0.3.1' into maint-0.3.2

"ours" merge to avoid earlier version of 25629 fix.




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


[tor-commits] [tor/release-0.3.3] Fix CID 1430932

2018-03-27 Thread nickm
commit 4bb7d9fd1241a3c263636efa03ee8c62ab744515
Author: Taylor Yu 
Date:   Mon Mar 26 17:51:50 2018 -0500

Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.
---
 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/changes/bug25629 b/changes/bug25629
new file mode 100644
index 0..190928a94
--- /dev/null
+++ b/changes/bug25629
@@ -0,0 +1,3 @@
+  o Minor bugfixes (C correctness):
+- Fix a very unlikely null pointer dereference.  Fixes bug 25629;
+  bugfix on 0.2.9.15.  Found by Coverity; this is CID 1430932.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 5a02648c5..26f990b08 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -263,13 +263,12 @@ nodelist_add_microdesc(microdesc_t *md)
   if (rs == NULL)
 return NULL;
   node = node_get_mutable_by_id(rs->identity_digest);
-  if (node) {
-if (node->md)
-  node->md->held_by_nodes--;
-node->md = md;
-md->held_by_nodes++;
-  }
-
+  if (node == NULL)
+return NULL;
+  if (node->md)
+node->md->held_by_nodes--;
+  node->md = md;
+  md->held_by_nodes++;
   node_add_to_address_set(node);
 
   return node;



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


[tor-commits] [tor/release-0.3.3] Merge branch 'maint-0.3.2' into maint-0.3.3

2018-03-27 Thread nickm
commit da5173c83148b4b437488571c2f6e88dc2e175eb
Merge: 46c2b0ca2 0b795ce6d
Author: Nick Mathewson 
Date:   Tue Mar 27 18:25:31 2018 -0400

Merge branch 'maint-0.3.2' into maint-0.3.3




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


[tor-commits] [tor/release-0.3.2] Fix CID 1430932

2018-03-27 Thread nickm
commit 0c13a84c0d9282e597227d117e23216bb459caad
Author: Taylor Yu 
Date:   Mon Mar 26 18:05:16 2018 -0500

Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.
---
 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/changes/bug25629 b/changes/bug25629
new file mode 100644
index 0..190928a94
--- /dev/null
+++ b/changes/bug25629
@@ -0,0 +1,3 @@
+  o Minor bugfixes (C correctness):
+- Fix a very unlikely null pointer dereference.  Fixes bug 25629;
+  bugfix on 0.2.9.15.  Found by Coverity; this is CID 1430932.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 9a477ecf4..ac9449855 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -525,22 +525,22 @@ nodelist_add_microdesc(microdesc_t *md)
   if (rs == NULL)
 return NULL;
   node = node_get_mutable_by_id(rs->identity_digest);
-  if (node) {
-node_remove_from_ed25519_map(node);
-if (node->md)
-  node->md->held_by_nodes--;
+  if (node == NULL)
+return NULL;
 
-node->md = md;
-md->held_by_nodes++;
-/* Setting the HSDir index requires the ed25519 identity key which can
- * only be found either in the ri or md. This is why this is called here.
- * Only nodes supporting HSDir=2 protocol version needs this index. */
-if (rs->supports_v3_hsdir) {
-  node_set_hsdir_index(node, ns);
-}
-node_add_to_ed25519_map(node);
-  }
+  node_remove_from_ed25519_map(node);
+  if (node->md)
+node->md->held_by_nodes--;
 
+  node->md = md;
+  md->held_by_nodes++;
+  /* Setting the HSDir index requires the ed25519 identity key which can
+   * only be found either in the ri or md. This is why this is called here.
+   * Only nodes supporting HSDir=2 protocol version needs this index. */
+  if (rs->supports_v3_hsdir) {
+node_set_hsdir_index(node, ns);
+  }
+  node_add_to_ed25519_map(node);
   node_add_to_address_set(node);
 
   return node;



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


[tor-commits] [tor/release-0.3.3] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-03-27 Thread nickm
commit 5acfc3087663340f55de6081cdd13b484525f43a
Merge: 068d09274 4bb7d9fd1
Author: Nick Mathewson 
Date:   Tue Mar 27 18:23:53 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 deletions(-)




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


[tor-commits] [tor/release-0.3.3] Merge branch 'maint-0.3.1' into maint-0.3.2

2018-03-27 Thread nickm
commit 5e7d505850607a16f6051a19ff60c39ff4c8393e
Merge: b5a6c0399 5acfc3087
Author: Nick Mathewson 
Date:   Tue Mar 27 18:24:37 2018 -0400

Merge branch 'maint-0.3.1' into maint-0.3.2

"ours" merge to avoid earlier version of 25629 fix.




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


[tor-commits] [tor/release-0.3.2] Merge branch 'maint-0.3.2' into release-0.3.2

2018-03-27 Thread nickm
commit 6170f87e01cc0d5f341c6a74ecb07f7f8838e6a5
Merge: 7dbaaba3d 0b795ce6d
Author: Nick Mathewson 
Date:   Tue Mar 27 18:25:21 2018 -0400

Merge branch 'maint-0.3.2' into release-0.3.2

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 deletions(-)

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


[tor-commits] [tor/release-0.3.2] Fix CID 1430932

2018-03-27 Thread nickm
commit 4bb7d9fd1241a3c263636efa03ee8c62ab744515
Author: Taylor Yu 
Date:   Mon Mar 26 17:51:50 2018 -0500

Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.
---
 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/changes/bug25629 b/changes/bug25629
new file mode 100644
index 0..190928a94
--- /dev/null
+++ b/changes/bug25629
@@ -0,0 +1,3 @@
+  o Minor bugfixes (C correctness):
+- Fix a very unlikely null pointer dereference.  Fixes bug 25629;
+  bugfix on 0.2.9.15.  Found by Coverity; this is CID 1430932.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 5a02648c5..26f990b08 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -263,13 +263,12 @@ nodelist_add_microdesc(microdesc_t *md)
   if (rs == NULL)
 return NULL;
   node = node_get_mutable_by_id(rs->identity_digest);
-  if (node) {
-if (node->md)
-  node->md->held_by_nodes--;
-node->md = md;
-md->held_by_nodes++;
-  }
-
+  if (node == NULL)
+return NULL;
+  if (node->md)
+node->md->held_by_nodes--;
+  node->md = md;
+  md->held_by_nodes++;
   node_add_to_address_set(node);
 
   return node;



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


[tor-commits] [tor/release-0.3.2] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-03-27 Thread nickm
commit 5acfc3087663340f55de6081cdd13b484525f43a
Merge: 068d09274 4bb7d9fd1
Author: Nick Mathewson 
Date:   Tue Mar 27 18:23:53 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 deletions(-)




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


[tor-commits] [tor/release-0.3.2] Merge remote-tracking branch 'catalyst-github/bug25629-032' into maint-0.3.2

2018-03-27 Thread nickm
commit 0b795ce6de339ccdabe17cb78f632df6f74901e2
Merge: 5e7d50585 0c13a84c0
Author: Nick Mathewson 
Date:   Tue Mar 27 18:24:59 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25629-032' into maint-0.3.2

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 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.3.3] Merge remote-tracking branch 'catalyst-github/bug25629-032' into maint-0.3.2

2018-03-27 Thread nickm
commit 0b795ce6de339ccdabe17cb78f632df6f74901e2
Merge: 5e7d50585 0c13a84c0
Author: Nick Mathewson 
Date:   Tue Mar 27 18:24:59 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25629-032' into maint-0.3.2

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 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.3.3] Fix CID 1430932

2018-03-27 Thread nickm
commit 471f28a2a85b8db8315f518aff456440f9791877
Author: Taylor Yu 
Date:   Mon Mar 26 19:29:59 2018 -0500

Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.
---
 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/changes/bug25629 b/changes/bug25629
new file mode 100644
index 0..190928a94
--- /dev/null
+++ b/changes/bug25629
@@ -0,0 +1,3 @@
+  o Minor bugfixes (C correctness):
+- Fix a very unlikely null pointer dereference.  Fixes bug 25629;
+  bugfix on 0.2.9.15.  Found by Coverity; this is CID 1430932.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 391b31d68..125dd8b9f 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -507,22 +507,22 @@ nodelist_add_microdesc(microdesc_t *md)
   if (rs == NULL)
 return NULL;
   node = node_get_mutable_by_id(rs->identity_digest);
-  if (node) {
-node_remove_from_ed25519_map(node);
-if (node->md)
-  node->md->held_by_nodes--;
+  if (node == NULL)
+return NULL;
 
-node->md = md;
-md->held_by_nodes++;
-/* Setting the HSDir index requires the ed25519 identity key which can
- * only be found either in the ri or md. This is why this is called here.
- * Only nodes supporting HSDir=2 protocol version needs this index. */
-if (rs->pv.supports_v3_hsdir) {
-  node_set_hsdir_index(node, ns);
-}
-node_add_to_ed25519_map(node);
-  }
+  node_remove_from_ed25519_map(node);
+  if (node->md)
+node->md->held_by_nodes--;
 
+  node->md = md;
+  md->held_by_nodes++;
+  /* Setting the HSDir index requires the ed25519 identity key which can
+   * only be found either in the ri or md. This is why this is called here.
+   * Only nodes supporting HSDir=2 protocol version needs this index. */
+  if (rs->pv.supports_v3_hsdir) {
+node_set_hsdir_index(node, ns);
+  }
+  node_add_to_ed25519_map(node);
   node_add_to_address_set(node);
 
   return node;



___
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.3.2' into maint-0.3.3

2018-03-27 Thread nickm
commit da5173c83148b4b437488571c2f6e88dc2e175eb
Merge: 46c2b0ca2 0b795ce6d
Author: Nick Mathewson 
Date:   Tue Mar 27 18:25:31 2018 -0400

Merge branch 'maint-0.3.2' into maint-0.3.3




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


[tor-commits] [tor/master] Fix CID 1430932

2018-03-27 Thread nickm
commit 471f28a2a85b8db8315f518aff456440f9791877
Author: Taylor Yu 
Date:   Mon Mar 26 19:29:59 2018 -0500

Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.
---
 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/changes/bug25629 b/changes/bug25629
new file mode 100644
index 0..190928a94
--- /dev/null
+++ b/changes/bug25629
@@ -0,0 +1,3 @@
+  o Minor bugfixes (C correctness):
+- Fix a very unlikely null pointer dereference.  Fixes bug 25629;
+  bugfix on 0.2.9.15.  Found by Coverity; this is CID 1430932.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 391b31d68..125dd8b9f 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -507,22 +507,22 @@ nodelist_add_microdesc(microdesc_t *md)
   if (rs == NULL)
 return NULL;
   node = node_get_mutable_by_id(rs->identity_digest);
-  if (node) {
-node_remove_from_ed25519_map(node);
-if (node->md)
-  node->md->held_by_nodes--;
+  if (node == NULL)
+return NULL;
 
-node->md = md;
-md->held_by_nodes++;
-/* Setting the HSDir index requires the ed25519 identity key which can
- * only be found either in the ri or md. This is why this is called here.
- * Only nodes supporting HSDir=2 protocol version needs this index. */
-if (rs->pv.supports_v3_hsdir) {
-  node_set_hsdir_index(node, ns);
-}
-node_add_to_ed25519_map(node);
-  }
+  node_remove_from_ed25519_map(node);
+  if (node->md)
+node->md->held_by_nodes--;
 
+  node->md = md;
+  md->held_by_nodes++;
+  /* Setting the HSDir index requires the ed25519 identity key which can
+   * only be found either in the ri or md. This is why this is called here.
+   * Only nodes supporting HSDir=2 protocol version needs this index. */
+  if (rs->pv.supports_v3_hsdir) {
+node_set_hsdir_index(node, ns);
+  }
+  node_add_to_ed25519_map(node);
   node_add_to_address_set(node);
 
   return node;



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


[tor-commits] [tor/release-0.3.1] Fix CID 1430932

2018-03-27 Thread nickm
commit 4bb7d9fd1241a3c263636efa03ee8c62ab744515
Author: Taylor Yu 
Date:   Mon Mar 26 17:51:50 2018 -0500

Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.
---
 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/changes/bug25629 b/changes/bug25629
new file mode 100644
index 0..190928a94
--- /dev/null
+++ b/changes/bug25629
@@ -0,0 +1,3 @@
+  o Minor bugfixes (C correctness):
+- Fix a very unlikely null pointer dereference.  Fixes bug 25629;
+  bugfix on 0.2.9.15.  Found by Coverity; this is CID 1430932.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 5a02648c5..26f990b08 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -263,13 +263,12 @@ nodelist_add_microdesc(microdesc_t *md)
   if (rs == NULL)
 return NULL;
   node = node_get_mutable_by_id(rs->identity_digest);
-  if (node) {
-if (node->md)
-  node->md->held_by_nodes--;
-node->md = md;
-md->held_by_nodes++;
-  }
-
+  if (node == NULL)
+return NULL;
+  if (node->md)
+node->md->held_by_nodes--;
+  node->md = md;
+  md->held_by_nodes++;
   node_add_to_address_set(node);
 
   return node;



___
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.3.3'

2018-03-27 Thread nickm
commit fa6eaab83e05a11b60735f7bf4064b05e7085230
Merge: 979c7e5c8 ddee28a3c
Author: Nick Mathewson 
Date:   Tue Mar 27 18:25:52 2018 -0400

Merge branch 'maint-0.3.3'

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 deletions(-)

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


[tor-commits] [tor/release-0.2.9] Fix CID 1430932

2018-03-27 Thread nickm
commit 4bb7d9fd1241a3c263636efa03ee8c62ab744515
Author: Taylor Yu 
Date:   Mon Mar 26 17:51:50 2018 -0500

Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.
---
 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/changes/bug25629 b/changes/bug25629
new file mode 100644
index 0..190928a94
--- /dev/null
+++ b/changes/bug25629
@@ -0,0 +1,3 @@
+  o Minor bugfixes (C correctness):
+- Fix a very unlikely null pointer dereference.  Fixes bug 25629;
+  bugfix on 0.2.9.15.  Found by Coverity; this is CID 1430932.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 5a02648c5..26f990b08 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -263,13 +263,12 @@ nodelist_add_microdesc(microdesc_t *md)
   if (rs == NULL)
 return NULL;
   node = node_get_mutable_by_id(rs->identity_digest);
-  if (node) {
-if (node->md)
-  node->md->held_by_nodes--;
-node->md = md;
-md->held_by_nodes++;
-  }
-
+  if (node == NULL)
+return NULL;
+  if (node->md)
+node->md->held_by_nodes--;
+  node->md = md;
+  md->held_by_nodes++;
   node_add_to_address_set(node);
 
   return node;



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


[tor-commits] [tor/release-0.3.3] Merge remote-tracking branch 'catalyst-github/bug25629-033' into maint-0.3.3

2018-03-27 Thread nickm
commit ddee28a3c9b9dd256cd6560a4766f17a6c6fc13d
Merge: da5173c83 471f28a2a
Author: Nick Mathewson 
Date:   Tue Mar 27 18:25:41 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25629-033' into maint-0.3.3

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 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.3.3] Merge branch 'maint-0.3.1' into maint-0.3.2

2018-03-27 Thread nickm
commit 5e7d505850607a16f6051a19ff60c39ff4c8393e
Merge: b5a6c0399 5acfc3087
Author: Nick Mathewson 
Date:   Tue Mar 27 18:24:37 2018 -0400

Merge branch 'maint-0.3.1' into maint-0.3.2

"ours" merge to avoid earlier version of 25629 fix.




___
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 'catalyst-github/bug25629-032' into maint-0.3.2

2018-03-27 Thread nickm
commit 0b795ce6de339ccdabe17cb78f632df6f74901e2
Merge: 5e7d50585 0c13a84c0
Author: Nick Mathewson 
Date:   Tue Mar 27 18:24:59 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25629-032' into maint-0.3.2

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 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.3.3] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-03-27 Thread nickm
commit 5acfc3087663340f55de6081cdd13b484525f43a
Merge: 068d09274 4bb7d9fd1
Author: Nick Mathewson 
Date:   Tue Mar 27 18:23:53 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 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.3.3] Merge branch 'maint-0.3.2' into maint-0.3.3

2018-03-27 Thread nickm
commit da5173c83148b4b437488571c2f6e88dc2e175eb
Merge: 46c2b0ca2 0b795ce6d
Author: Nick Mathewson 
Date:   Tue Mar 27 18:25:31 2018 -0400

Merge branch 'maint-0.3.2' into maint-0.3.3




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


[tor-commits] [tor/release-0.3.1] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-03-27 Thread nickm
commit 5acfc3087663340f55de6081cdd13b484525f43a
Merge: 068d09274 4bb7d9fd1
Author: Nick Mathewson 
Date:   Tue Mar 27 18:23:53 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 deletions(-)




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


[tor-commits] [tor/release-0.2.9] Merge branch 'maint-0.2.9' into release-0.2.9

2018-03-27 Thread nickm
commit c26fa05370b858035e5a8b92c21deb78dbc1f8ea
Merge: 2a0865898 4bb7d9fd1
Author: Nick Mathewson 
Date:   Tue Mar 27 18:23:53 2018 -0400

Merge branch 'maint-0.2.9' into release-0.2.9

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 deletions(-)

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


[tor-commits] [tor/release-0.3.1] Merge branch 'maint-0.3.1' into release-0.3.1

2018-03-27 Thread nickm
commit cbea95ae6736e5ec62af6b7341245a84629e3a2c
Merge: e9ec63d1a 5acfc3087
Author: Nick Mathewson 
Date:   Tue Mar 27 18:23:53 2018 -0400

Merge branch 'maint-0.3.1' into release-0.3.1

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 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.3.1] Fix CID 1430932

2018-03-27 Thread nickm
commit 4bb7d9fd1241a3c263636efa03ee8c62ab744515
Author: Taylor Yu 
Date:   Mon Mar 26 17:51:50 2018 -0500

Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.
---
 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/changes/bug25629 b/changes/bug25629
new file mode 100644
index 0..190928a94
--- /dev/null
+++ b/changes/bug25629
@@ -0,0 +1,3 @@
+  o Minor bugfixes (C correctness):
+- Fix a very unlikely null pointer dereference.  Fixes bug 25629;
+  bugfix on 0.2.9.15.  Found by Coverity; this is CID 1430932.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 5a02648c5..26f990b08 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -263,13 +263,12 @@ nodelist_add_microdesc(microdesc_t *md)
   if (rs == NULL)
 return NULL;
   node = node_get_mutable_by_id(rs->identity_digest);
-  if (node) {
-if (node->md)
-  node->md->held_by_nodes--;
-node->md = md;
-md->held_by_nodes++;
-  }
-
+  if (node == NULL)
+return NULL;
+  if (node->md)
+node->md->held_by_nodes--;
+  node->md = md;
+  md->held_by_nodes++;
   node_add_to_address_set(node);
 
   return node;



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


[tor-commits] [tor/maint-0.3.3] Merge remote-tracking branch 'catalyst-github/bug25629-033' into maint-0.3.3

2018-03-27 Thread nickm
commit ddee28a3c9b9dd256cd6560a4766f17a6c6fc13d
Merge: da5173c83 471f28a2a
Author: Nick Mathewson 
Date:   Tue Mar 27 18:25:41 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25629-033' into maint-0.3.3

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 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.9' into maint-0.3.1

2018-03-27 Thread nickm
commit 5acfc3087663340f55de6081cdd13b484525f43a
Merge: 068d09274 4bb7d9fd1
Author: Nick Mathewson 
Date:   Tue Mar 27 18:23:53 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 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.3.1' into maint-0.3.2

2018-03-27 Thread nickm
commit 5e7d505850607a16f6051a19ff60c39ff4c8393e
Merge: b5a6c0399 5acfc3087
Author: Nick Mathewson 
Date:   Tue Mar 27 18:24:37 2018 -0400

Merge branch 'maint-0.3.1' into maint-0.3.2

"ours" merge to avoid earlier version of 25629 fix.




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


[tor-commits] [tor/master] Fix CID 1430932

2018-03-27 Thread nickm
commit 0c13a84c0d9282e597227d117e23216bb459caad
Author: Taylor Yu 
Date:   Mon Mar 26 18:05:16 2018 -0500

Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.
---
 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/changes/bug25629 b/changes/bug25629
new file mode 100644
index 0..190928a94
--- /dev/null
+++ b/changes/bug25629
@@ -0,0 +1,3 @@
+  o Minor bugfixes (C correctness):
+- Fix a very unlikely null pointer dereference.  Fixes bug 25629;
+  bugfix on 0.2.9.15.  Found by Coverity; this is CID 1430932.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 9a477ecf4..ac9449855 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -525,22 +525,22 @@ nodelist_add_microdesc(microdesc_t *md)
   if (rs == NULL)
 return NULL;
   node = node_get_mutable_by_id(rs->identity_digest);
-  if (node) {
-node_remove_from_ed25519_map(node);
-if (node->md)
-  node->md->held_by_nodes--;
+  if (node == NULL)
+return NULL;
 
-node->md = md;
-md->held_by_nodes++;
-/* Setting the HSDir index requires the ed25519 identity key which can
- * only be found either in the ri or md. This is why this is called here.
- * Only nodes supporting HSDir=2 protocol version needs this index. */
-if (rs->supports_v3_hsdir) {
-  node_set_hsdir_index(node, ns);
-}
-node_add_to_ed25519_map(node);
-  }
+  node_remove_from_ed25519_map(node);
+  if (node->md)
+node->md->held_by_nodes--;
 
+  node->md = md;
+  md->held_by_nodes++;
+  /* Setting the HSDir index requires the ed25519 identity key which can
+   * only be found either in the ri or md. This is why this is called here.
+   * Only nodes supporting HSDir=2 protocol version needs this index. */
+  if (rs->supports_v3_hsdir) {
+node_set_hsdir_index(node, ns);
+  }
+  node_add_to_ed25519_map(node);
   node_add_to_address_set(node);
 
   return node;



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


[tor-commits] [tor/maint-0.3.1] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-03-27 Thread nickm
commit 5acfc3087663340f55de6081cdd13b484525f43a
Merge: 068d09274 4bb7d9fd1
Author: Nick Mathewson 
Date:   Tue Mar 27 18:23:53 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 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 'catalyst-github/bug25629-033' into maint-0.3.3

2018-03-27 Thread nickm
commit ddee28a3c9b9dd256cd6560a4766f17a6c6fc13d
Merge: da5173c83 471f28a2a
Author: Nick Mathewson 
Date:   Tue Mar 27 18:25:41 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25629-033' into maint-0.3.3

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 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.3.2] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-03-27 Thread nickm
commit 5acfc3087663340f55de6081cdd13b484525f43a
Merge: 068d09274 4bb7d9fd1
Author: Nick Mathewson 
Date:   Tue Mar 27 18:23:53 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 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.3.2] Fix CID 1430932

2018-03-27 Thread nickm
commit 0c13a84c0d9282e597227d117e23216bb459caad
Author: Taylor Yu 
Date:   Mon Mar 26 18:05:16 2018 -0500

Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.
---
 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/changes/bug25629 b/changes/bug25629
new file mode 100644
index 0..190928a94
--- /dev/null
+++ b/changes/bug25629
@@ -0,0 +1,3 @@
+  o Minor bugfixes (C correctness):
+- Fix a very unlikely null pointer dereference.  Fixes bug 25629;
+  bugfix on 0.2.9.15.  Found by Coverity; this is CID 1430932.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 9a477ecf4..ac9449855 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -525,22 +525,22 @@ nodelist_add_microdesc(microdesc_t *md)
   if (rs == NULL)
 return NULL;
   node = node_get_mutable_by_id(rs->identity_digest);
-  if (node) {
-node_remove_from_ed25519_map(node);
-if (node->md)
-  node->md->held_by_nodes--;
+  if (node == NULL)
+return NULL;
 
-node->md = md;
-md->held_by_nodes++;
-/* Setting the HSDir index requires the ed25519 identity key which can
- * only be found either in the ri or md. This is why this is called here.
- * Only nodes supporting HSDir=2 protocol version needs this index. */
-if (rs->supports_v3_hsdir) {
-  node_set_hsdir_index(node, ns);
-}
-node_add_to_ed25519_map(node);
-  }
+  node_remove_from_ed25519_map(node);
+  if (node->md)
+node->md->held_by_nodes--;
 
+  node->md = md;
+  md->held_by_nodes++;
+  /* Setting the HSDir index requires the ed25519 identity key which can
+   * only be found either in the ri or md. This is why this is called here.
+   * Only nodes supporting HSDir=2 protocol version needs this index. */
+  if (rs->supports_v3_hsdir) {
+node_set_hsdir_index(node, ns);
+  }
+  node_add_to_ed25519_map(node);
   node_add_to_address_set(node);
 
   return node;



___
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.9] Fix CID 1430932

2018-03-27 Thread nickm
commit 4bb7d9fd1241a3c263636efa03ee8c62ab744515
Author: Taylor Yu 
Date:   Mon Mar 26 17:51:50 2018 -0500

Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.
---
 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/changes/bug25629 b/changes/bug25629
new file mode 100644
index 0..190928a94
--- /dev/null
+++ b/changes/bug25629
@@ -0,0 +1,3 @@
+  o Minor bugfixes (C correctness):
+- Fix a very unlikely null pointer dereference.  Fixes bug 25629;
+  bugfix on 0.2.9.15.  Found by Coverity; this is CID 1430932.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 5a02648c5..26f990b08 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -263,13 +263,12 @@ nodelist_add_microdesc(microdesc_t *md)
   if (rs == NULL)
 return NULL;
   node = node_get_mutable_by_id(rs->identity_digest);
-  if (node) {
-if (node->md)
-  node->md->held_by_nodes--;
-node->md = md;
-md->held_by_nodes++;
-  }
-
+  if (node == NULL)
+return NULL;
+  if (node->md)
+node->md->held_by_nodes--;
+  node->md = md;
+  md->held_by_nodes++;
   node_add_to_address_set(node);
 
   return node;

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


[tor-commits] [tor/maint-0.3.2] Merge remote-tracking branch 'catalyst-github/bug25629-032' into maint-0.3.2

2018-03-27 Thread nickm
commit 0b795ce6de339ccdabe17cb78f632df6f74901e2
Merge: 5e7d50585 0c13a84c0
Author: Nick Mathewson 
Date:   Tue Mar 27 18:24:59 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25629-032' into maint-0.3.2

 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 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.3.2] Merge branch 'maint-0.3.1' into maint-0.3.2

2018-03-27 Thread nickm
commit 5e7d505850607a16f6051a19ff60c39ff4c8393e
Merge: b5a6c0399 5acfc3087
Author: Nick Mathewson 
Date:   Tue Mar 27 18:24:37 2018 -0400

Merge branch 'maint-0.3.1' into maint-0.3.2

"ours" merge to avoid earlier version of 25629 fix.




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


[tor-commits] [tor/maint-0.3.3] Fix CID 1430932

2018-03-27 Thread nickm
commit 4bb7d9fd1241a3c263636efa03ee8c62ab744515
Author: Taylor Yu 
Date:   Mon Mar 26 17:51:50 2018 -0500

Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.
---
 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/changes/bug25629 b/changes/bug25629
new file mode 100644
index 0..190928a94
--- /dev/null
+++ b/changes/bug25629
@@ -0,0 +1,3 @@
+  o Minor bugfixes (C correctness):
+- Fix a very unlikely null pointer dereference.  Fixes bug 25629;
+  bugfix on 0.2.9.15.  Found by Coverity; this is CID 1430932.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 5a02648c5..26f990b08 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -263,13 +263,12 @@ nodelist_add_microdesc(microdesc_t *md)
   if (rs == NULL)
 return NULL;
   node = node_get_mutable_by_id(rs->identity_digest);
-  if (node) {
-if (node->md)
-  node->md->held_by_nodes--;
-node->md = md;
-md->held_by_nodes++;
-  }
-
+  if (node == NULL)
+return NULL;
+  if (node->md)
+node->md->held_by_nodes--;
+  node->md = md;
+  md->held_by_nodes++;
   node_add_to_address_set(node);
 
   return node;



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


[tor-commits] [tor/maint-0.3.2] Fix CID 1430932

2018-03-27 Thread nickm
commit 4bb7d9fd1241a3c263636efa03ee8c62ab744515
Author: Taylor Yu 
Date:   Mon Mar 26 17:51:50 2018 -0500

Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.
---
 changes/bug25629  |  3 +++
 src/or/nodelist.c | 13 ++---
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/changes/bug25629 b/changes/bug25629
new file mode 100644
index 0..190928a94
--- /dev/null
+++ b/changes/bug25629
@@ -0,0 +1,3 @@
+  o Minor bugfixes (C correctness):
+- Fix a very unlikely null pointer dereference.  Fixes bug 25629;
+  bugfix on 0.2.9.15.  Found by Coverity; this is CID 1430932.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 5a02648c5..26f990b08 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -263,13 +263,12 @@ nodelist_add_microdesc(microdesc_t *md)
   if (rs == NULL)
 return NULL;
   node = node_get_mutable_by_id(rs->identity_digest);
-  if (node) {
-if (node->md)
-  node->md->held_by_nodes--;
-node->md = md;
-md->held_by_nodes++;
-  }
-
+  if (node == NULL)
+return NULL;
+  if (node->md)
+node->md->held_by_nodes--;
+  node->md = md;
+  md->held_by_nodes++;
   node_add_to_address_set(node);
 
   return node;



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


[tor-commits] [tor/maint-0.3.3] Fix CID 1430932

2018-03-27 Thread nickm
commit 0c13a84c0d9282e597227d117e23216bb459caad
Author: Taylor Yu 
Date:   Mon Mar 26 18:05:16 2018 -0500

Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.
---
 changes/bug25629  |  3 +++
 src/or/nodelist.c | 28 ++--
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/changes/bug25629 b/changes/bug25629
new file mode 100644
index 0..190928a94
--- /dev/null
+++ b/changes/bug25629
@@ -0,0 +1,3 @@
+  o Minor bugfixes (C correctness):
+- Fix a very unlikely null pointer dereference.  Fixes bug 25629;
+  bugfix on 0.2.9.15.  Found by Coverity; this is CID 1430932.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 9a477ecf4..ac9449855 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -525,22 +525,22 @@ nodelist_add_microdesc(microdesc_t *md)
   if (rs == NULL)
 return NULL;
   node = node_get_mutable_by_id(rs->identity_digest);
-  if (node) {
-node_remove_from_ed25519_map(node);
-if (node->md)
-  node->md->held_by_nodes--;
+  if (node == NULL)
+return NULL;
 
-node->md = md;
-md->held_by_nodes++;
-/* Setting the HSDir index requires the ed25519 identity key which can
- * only be found either in the ri or md. This is why this is called here.
- * Only nodes supporting HSDir=2 protocol version needs this index. */
-if (rs->supports_v3_hsdir) {
-  node_set_hsdir_index(node, ns);
-}
-node_add_to_ed25519_map(node);
-  }
+  node_remove_from_ed25519_map(node);
+  if (node->md)
+node->md->held_by_nodes--;
 
+  node->md = md;
+  md->held_by_nodes++;
+  /* Setting the HSDir index requires the ed25519 identity key which can
+   * only be found either in the ri or md. This is why this is called here.
+   * Only nodes supporting HSDir=2 protocol version needs this index. */
+  if (rs->supports_v3_hsdir) {
+node_set_hsdir_index(node, ns);
+  }
+  node_add_to_ed25519_map(node);
   node_add_to_address_set(node);
 
   return node;



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


[tor-commits] [torspec/master] Fix typo in tor-spec.txt

2018-03-27 Thread catalyst
commit 353b51e25752b022115b8b3ae2f1d8e057ebb9fb
Author: Taylor Yu 
Date:   Tue Mar 27 13:36:18 2018 -0500

Fix typo in tor-spec.txt

Section 5.1.2 erroneously suggested that a client might send an
EXTENDED2 cell, which was probably a typo.  Also change "a" to "an".
---
 tor-spec.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tor-spec.txt b/tor-spec.txt
index 13691b7..ea195ad 100644
--- a/tor-spec.txt
+++ b/tor-spec.txt
@@ -938,7 +938,7 @@ see tor-design.pdf.
 
 5.1.2. EXTEND and EXTENDED cells
 
-   To extend an existing circuit, the client sends a EXTEND or EXTENDED2
+   To extend an existing circuit, the client sends an EXTEND or EXTEND2
relay cell to the last node in the circuit.
 
An EXTEND2 cell's relay payload contains:

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


[tor-commits] [metrics-web/master] Convert shell script into Ant task.

2018-03-27 Thread karsten
commit 3be34c3be42a9fda3258c152efa5f56a2693519d
Author: iwakeh 
Date:   Wed Jan 31 19:29:57 2018 +

Convert shell script into Ant task.
---
 build.xml  | 49 ++
 src/main/resources/spec/convert.sh |  6 -
 2 files changed, 49 insertions(+), 6 deletions(-)

diff --git a/build.xml b/build.xml
index 57eab68..0e05d12 100644
--- a/build.xml
+++ b/build.xml
@@ -24,6 +24,8 @@
   
   
 
+  
+
   
   
 
 
+
 
 
+  
   
   
@@ -249,6 +255,49 @@
 
   
 
+  
+
+
+  
+
+
+  
+
+  
+
+  
+
+
+  
+  
+  
+
+
+  
+  
+
+
+  
+  
+  
+
+
+
+
+  
+
   
   
diff --git a/src/main/resources/spec/convert.sh 
b/src/main/resources/spec/convert.sh
deleted file mode 100755
index 95287e2..000
--- a/src/main/resources/spec/convert.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-for specfile in "bridge-descriptors" "web-server-logs"; do
-  saxon-xslt $specfile.xml rfc2629.xslt xml2rfc-topblock=no | \
-  tidy -q | awk -f convert.awk > ../web/jsps/$specfile.jsp
-done
-

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


[tor-commits] [translation/liveusb-creator] Update translations for liveusb-creator

2018-03-27 Thread translation
commit fa43ec475d40268372266e6ef47eabcee293ee52
Author: Translation commit bot 
Date:   Tue Mar 27 17:15:44 2018 +

Update translations for liveusb-creator
---
 fr/fr.po | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fr/fr.po b/fr/fr.po
index e4ef1797a..5781eef14 100644
--- a/fr/fr.po
+++ b/fr/fr.po
@@ -28,7 +28,7 @@ msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-11-10 15:57+0100\n"
-"PO-Revision-Date: 2018-03-26 20:41+\n"
+"PO-Revision-Date: 2018-03-27 17:08+\n"
 "Last-Translator: French language coordinator \n"
 "Language-Team: French 
(http://www.transifex.com/otf/torproject/language/fr/)\n"
 "MIME-Version: 1.0\n"
@@ -400,7 +400,7 @@ msgstr "Impossible de monter le périphérique"
 
 #: ../tails_installer/gui.py:705 ../tails_installer/gui.py:735
 msgid "Confirm the target USB stick"
-msgstr "Confirmez la clé USB cible"
+msgstr "Confirmer la clé USB cible"
 
 #: ../tails_installer/gui.py:706
 #, python-format

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


[tor-commits] [translation/liveusb-creator_completed] Update translations for liveusb-creator_completed

2018-03-27 Thread translation
commit f888a68dd2e6158418bea647f5cf840f37dff8e5
Author: Translation commit bot 
Date:   Tue Mar 27 17:15:49 2018 +

Update translations for liveusb-creator_completed
---
 fr/fr.po | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fr/fr.po b/fr/fr.po
index e4ef1797a..5781eef14 100644
--- a/fr/fr.po
+++ b/fr/fr.po
@@ -28,7 +28,7 @@ msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-11-10 15:57+0100\n"
-"PO-Revision-Date: 2018-03-26 20:41+\n"
+"PO-Revision-Date: 2018-03-27 17:08+\n"
 "Last-Translator: French language coordinator \n"
 "Language-Team: French 
(http://www.transifex.com/otf/torproject/language/fr/)\n"
 "MIME-Version: 1.0\n"
@@ -400,7 +400,7 @@ msgstr "Impossible de monter le périphérique"
 
 #: ../tails_installer/gui.py:705 ../tails_installer/gui.py:735
 msgid "Confirm the target USB stick"
-msgstr "Confirmez la clé USB cible"
+msgstr "Confirmer la clé USB cible"
 
 #: ../tails_installer/gui.py:706
 #, python-format

___
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-52.7.3esr-8.0-1] fixup! Bug 16940: After update, load local change notes.

2018-03-27 Thread gk
commit 7719a132533d0e245602b9aee496875a8cb03cd5
Author: Kathy Brade 
Date:   Wed Jan 17 14:01:51 2018 -0500

fixup! Bug 16940: After update, load local change notes.

Always load about:tbupdate in a content process.
To improve compatiblity with future sandboxing efforts, relocate the
  code that accesses the file system (changelog) to the chrome process.
Avoid using a query string to pass the "more info" link to the
  about:tbupdate page.
Remove obsolete flag nsIAboutModule::MAKE_UNLINKABLE (about: pages
  are unlinkable by default).
---
 browser/base/content/browser.js   |  22 +++--
 browser/base/content/tab-content.js   | 104 
 browser/base/jar.mn   |   2 +-
 browser/base/moz.build|   3 +
 browser/components/about/AboutRedirector.cpp  |   2 +-
 browser/components/nsBrowserContentHandler.js |   5 +-
 browser/components/nsBrowserGlue.js   |   9 +++
 browser/modules/AboutTBUpdate.jsm | 111 ++
 browser/modules/moz.build |   5 ++
 toolkit/modules/AppConstants.jsm  |   7 ++
 toolkit/modules/moz.build |   3 +
 11 files changed, 186 insertions(+), 87 deletions(-)

diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index 5c0d9a4d7161..5eabd3373b71 100755
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -215,9 +215,6 @@ this.__defineSetter__("AddonManager", function (val) {
 
 var gInitialPages = [
   "about:tor",
-#ifdef TOR_BROWSER_UPDATE
-  "about:tbupdate",
-#endif
   "about:blank",
   "about:newtab",
   "about:home",
@@ -225,6 +222,9 @@ var gInitialPages = [
   "about:welcomeback",
   "about:sessionrestore"
 ];
+if (AppConstants.TOR_BROWSER_UPDATE) {
+  gInitialPages.push("about:tbupdate");
+}
 
 function* browserWindows() {
   let windows = Services.wm.getEnumerator("navigator:browser");
@@ -2420,13 +2420,8 @@ function URLBarSetURI(aURI) {
 // 2. if remote newtab is enabled and it's the default remote newtab page
 let defaultRemoteURL = gAboutNewTabService.remoteEnabled &&
uri.spec === gAboutNewTabService.newTabURL;
-#ifdef TOR_BROWSER_UPDATE
-if ((gInitialPages.includes(uri.spec.split('?')[0]) || defaultRemoteURL) &&
-checkEmptyPageOrigin(gBrowser.selectedBrowser, uri))
-#else
 if ((gInitialPages.includes(uri.spec) || defaultRemoteURL) &&
 checkEmptyPageOrigin(gBrowser.selectedBrowser, uri))
-#endif
 {
   value = "";
 } else {
@@ -7453,11 +7448,12 @@ var gIdentityHandler = {
   this._uriHasHost = false;
 }
 
-#ifdef TOR_BROWSER_UPDATE
-let whitelist = 
/^(?:accounts|addons|cache|config|crashes|customizing|downloads|healthreport|home|license|newaddon|permissions|preferences|privatebrowsing|rights|searchreset|sessionrestore|support|welcomeback|tor|tbupdate)(?:[?#]|$)/i;
-#else
-let whitelist = 
/^(?:accounts|addons|cache|config|crashes|customizing|downloads|healthreport|home|license|newaddon|permissions|preferences|privatebrowsing|rights|searchreset|sessionrestore|support|welcomeback|tor)(?:[?#]|$)/i;
-#endif
+let whitelist;
+if (AppConstants.TOR_BROWSER_UPDATE) {
+  whitelist = 
/^(?:accounts|addons|cache|config|crashes|customizing|downloads|healthreport|home|license|newaddon|permissions|preferences|privatebrowsing|rights|searchreset|sessionrestore|support|welcomeback|tor|tbupdate)(?:[?#]|$)/i;
+} else {
+  whitelist = 
/^(?:accounts|addons|cache|config|crashes|customizing|downloads|healthreport|home|license|newaddon|permissions|preferences|privatebrowsing|rights|searchreset|sessionrestore|support|welcomeback|tor)(?:[?#]|$)/i;
+}
 this._isSecureInternalUI = uri.schemeIs("about") && 
whitelist.test(uri.path);
 
 // Create a channel for the sole purpose of getting the resolved URI
diff --git a/browser/base/content/tab-content.js 
b/browser/base/content/tab-content.js
index d7d565ec50de..9aefa567fbae 100644
--- a/browser/base/content/tab-content.js
+++ b/browser/base/content/tab-content.js
@@ -5,19 +5,11 @@
 
 /* This content script contains code that requires a tab browser. */
 
-#ifdef TOR_BROWSER_VERSION
-# Add double-quotes back on (stripped by JarMaker.py).
-#expand const TOR_BROWSER_VERSION = "__TOR_BROWSER_VERSION__";
-#endif
-
 var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/ExtensionContent.jsm");
-#ifdef TOR_BROWSER_UPDATE
-Cu.import("resource://gre/modules/NetUtil.jsm");
-#endif
 
 XPCOMUtils.defineLazyModuleGetter(this, "E10SUtils",
   "resource:///modules/E10SUtils.jsm");
@@ -408,80 +400,50 @@ let AboutTBUpdateListener = {
   },
 
   get isAboutTBUpdate() {
-return 

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

2018-03-27 Thread translation
commit 25ca27477d811d8918b2d35b46f6ccb3dc0c6cbe
Author: Translation commit bot 
Date:   Tue Mar 27 15:46:43 2018 +

Update translations for tails-misc
---
 tr.po | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tr.po b/tr.po
index 7bdef5c08..0cb4304f1 100644
--- a/tr.po
+++ b/tr.po
@@ -27,7 +27,7 @@ msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2018-03-12 19:03+0100\n"
-"PO-Revision-Date: 2018-03-27 15:07+\n"
+"PO-Revision-Date: 2018-03-27 15:23+\n"
 "Last-Translator: Can Günay \n"
 "Language-Team: Turkish 
(http://www.transifex.com/otf/torproject/language/tr/)\n"
 "MIME-Version: 1.0\n"
@@ -92,7 +92,7 @@ msgstr "Yeniden başlat"
 
 #: 
config/chroot_local-includes/usr/share/gnome-shell/extensions/status-menu-hel...@tails.boum.org/extension.js:78
 msgid "Lock screen"
-msgstr ""
+msgstr "Ekranı kilitle"
 
 #: 
config/chroot_local-includes/usr/share/gnome-shell/extensions/status-menu-hel...@tails.boum.org/extension.js:81
 msgid "Power Off"

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


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

2018-03-27 Thread translation
commit 280a126b6e44405342c0e7a9d08b43da9feff4db
Author: Translation commit bot 
Date:   Tue Mar 27 15:46:17 2018 +

Update translations for tor-launcher-properties
---
 tr/torlauncher.properties | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tr/torlauncher.properties b/tr/torlauncher.properties
index 745af75b9..a40956d82 100644
--- a/tr/torlauncher.properties
+++ b/tr/torlauncher.properties
@@ -36,7 +36,7 @@ torlauncher.request_a_bridge=Köprü talep edin...
 torlauncher.request_a_new_bridge=Yeni Köprü talep edin...
 torlauncher.contacting_bridgedb=Köprü veritabanına bağlanılıyor. Lütfen 
bekleyin.
 torlauncher.captcha_prompt=Köprü talep etmek için lütfen güvenlik kodunu 
girin.
-torlauncher.bad_captcha_solution=The solution is not correct. Please try again.
+torlauncher.bad_captcha_solution=Çözümleme doğru değil. Lütfen yeniden 
deneyin.
 torlauncher.unable_to_get_bridge=Köprü veritabanından köprü alınamıyor.
 torlauncher.no_meek=This browser is not configured for meek, which is needed 
to obtain bridges.
 torlauncher.no_bridges_available=Şu anda hiçbir köprü müsait değil. 
Üzgünüz.
@@ -75,4 +75,4 @@ torlauncher.bootstrapWarning.pt_missing=takılabilir aktarım 
bulunamadı
 
 torlauncher.nsresult.NS_ERROR_NET_RESET=Sunucuyla bağlantı kesildi
 torlauncher.nsresult.NS_ERROR_CONNECTION_REFUSED=Sunucuya bağlanılamadı.
-torlauncher.nsresult.NS_ERROR_PROXY_CONNECTION_REFUSED=Could not connect to 
the proxy.
+torlauncher.nsresult.NS_ERROR_PROXY_CONNECTION_REFUSED=Vekil sunucusuna 
bağlanılamadı.

___
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

2018-03-27 Thread translation
commit f6fac382a4358a6f1bbe90a0ba1941181e060028
Author: Translation commit bot 
Date:   Tue Mar 27 15:16:42 2018 +

Update translations for tails-misc
---
 tr.po | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/tr.po b/tr.po
index d49a7ae72..7bdef5c08 100644
--- a/tr.po
+++ b/tr.po
@@ -5,6 +5,7 @@
 # Translators:
 # Ayca Omrak , 2013
 # Bullgeschichte , 2015
+# Can Günay , 2018
 # cmldrs, 2014
 # cmldrs, 2014
 # imratirtil , 2014
@@ -26,8 +27,8 @@ msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2018-03-12 19:03+0100\n"
-"PO-Revision-Date: 2018-03-13 02:48+\n"
-"Last-Translator: carolyn \n"
+"PO-Revision-Date: 2018-03-27 15:07+\n"
+"Last-Translator: Can Günay \n"
 "Language-Team: Turkish 
(http://www.transifex.com/otf/torproject/language/tr/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -124,26 +125,26 @@ msgstr "kullanılamıyor"
 
 #: config/chroot_local-includes/usr/local/sbin/tails-additional-software:170
 msgid "Your additional software installation failed"
-msgstr ""
+msgstr "Ek yazılımlarınız kurulmadı"
 
 #: config/chroot_local-includes/usr/local/sbin/tails-additional-software:171
 msgid ""
 "The installation failed. Please check your additional software "
 "configuration, or read the system log to understand better the problem."
-msgstr ""
+msgstr "Yazılım kurulamadı. Lütfen ek yazılım ayarlarınızı kontrol 
edin veya sorunu daha iyi anlamak için sistem günlüğünüze bakın."
 
 #: config/chroot_local-includes/usr/local/sbin/tails-additional-software:177
 msgid "Your additional software are installed"
-msgstr ""
+msgstr "Ek yazılımlarınız kuruldu"
 
 #: config/chroot_local-includes/usr/local/sbin/tails-additional-software:178
 msgid "Your additional software are ready to use."
-msgstr ""
+msgstr "Ek yazılımlarınız kullanıma hazır."
 
 #: config/chroot_local-includes/usr/local/sbin/tails-additional-software:194
 #: config/chroot_local-includes/usr/local/sbin/tails-additional-software:204
 msgid "Your additional software upgrade failed"
-msgstr ""
+msgstr "Ek yazılımlarınız yükseltilemedi"
 
 #: config/chroot_local-includes/usr/local/sbin/tails-additional-software:195
 msgid ""

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


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

2018-03-27 Thread translation
commit 58b5d2f789f36912a8c20f2906e94ad11e109c41
Author: Translation commit bot 
Date:   Tue Mar 27 15:16:18 2018 +

Update translations for tor-launcher-properties
---
 tr/torlauncher.properties | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tr/torlauncher.properties b/tr/torlauncher.properties
index cf44e7e86..745af75b9 100644
--- a/tr/torlauncher.properties
+++ b/tr/torlauncher.properties
@@ -26,20 +26,20 @@ torlauncher.error_proxy_addr_missing=Ä°nternet'e bir vekil 
sunucu üzerinden ba
 torlauncher.error_proxy_type_missing=Vekil sunucu türünü seçmelisiniz.
 torlauncher.error_bridges_missing=Bir ya da birkaç köprü belirtmelisiniz.
 torlauncher.error_default_bridges_type_missing=Hazır köprüler için bir 
aktarım türü seçmelisiniz.
-torlauncher.error_bridgedb_bridges_missing=Please request a bridge.
+torlauncher.error_bridgedb_bridges_missing=Lütfen köprü talep edin.
 torlauncher.error_bridge_bad_default_type=Hazır köprüler %S aktarım türü 
için kullanılamıyor. Lütfen ayarlarınızı değiştirin.
 
 torlauncher.bridge_suffix.meek-amazon=(Çin'de çalışır)
 torlauncher.bridge_suffix.meek-azure=(Çin'de çalışır)
 
-torlauncher.request_a_bridge=Request a Bridge…
-torlauncher.request_a_new_bridge=Request a New Bridge…
+torlauncher.request_a_bridge=Köprü talep edin...
+torlauncher.request_a_new_bridge=Yeni Köprü talep edin...
 torlauncher.contacting_bridgedb=Köprü veritabanına bağlanılıyor. Lütfen 
bekleyin.
-torlauncher.captcha_prompt=Solve the CAPTCHA to request a bridge.
+torlauncher.captcha_prompt=Köprü talep etmek için lütfen güvenlik kodunu 
girin.
 torlauncher.bad_captcha_solution=The solution is not correct. Please try again.
-torlauncher.unable_to_get_bridge=Unable to obtain a bridge from BridgeDB.\n\n%S
+torlauncher.unable_to_get_bridge=Köprü veritabanından köprü alınamıyor.
 torlauncher.no_meek=This browser is not configured for meek, which is needed 
to obtain bridges.
-torlauncher.no_bridges_available=No bridges are available at this time. Sorry.
+torlauncher.no_bridges_available=Şu anda hiçbir köprü müsait değil. 
Üzgünüz.
 
 torlauncher.connect=Bağlan
 torlauncher.restart_tor=Tor'u Yeniden Başlat
@@ -74,5 +74,5 @@ torlauncher.bootstrapWarning.ioerror=okuma/yazma hatası
 torlauncher.bootstrapWarning.pt_missing=takılabilir aktarım bulunamadı
 
 torlauncher.nsresult.NS_ERROR_NET_RESET=Sunucuyla bağlantı kesildi
-torlauncher.nsresult.NS_ERROR_CONNECTION_REFUSED=Could not connect to the 
server.
+torlauncher.nsresult.NS_ERROR_CONNECTION_REFUSED=Sunucuya bağlanılamadı.
 torlauncher.nsresult.NS_ERROR_PROXY_CONNECTION_REFUSED=Could not connect to 
the proxy.

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


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

2018-03-27 Thread translation
commit 634887c11cb09c81725d65a55cd284e2a80173a1
Author: Translation commit bot 
Date:   Tue Mar 27 14:46:17 2018 +

Update translations for tor-launcher-properties
---
 tr/torlauncher.properties | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tr/torlauncher.properties b/tr/torlauncher.properties
index 1586384a6..cf44e7e86 100644
--- a/tr/torlauncher.properties
+++ b/tr/torlauncher.properties
@@ -34,7 +34,7 @@ torlauncher.bridge_suffix.meek-azure=(Çin'de çalışır)
 
 torlauncher.request_a_bridge=Request a Bridge…
 torlauncher.request_a_new_bridge=Request a New Bridge…
-torlauncher.contacting_bridgedb=Contacting BridgeDB. Please wait.
+torlauncher.contacting_bridgedb=Köprü veritabanına bağlanılıyor. Lütfen 
bekleyin.
 torlauncher.captcha_prompt=Solve the CAPTCHA to request a bridge.
 torlauncher.bad_captcha_solution=The solution is not correct. Please try again.
 torlauncher.unable_to_get_bridge=Unable to obtain a bridge from BridgeDB.\n\n%S
@@ -73,6 +73,6 @@ torlauncher.bootstrapWarning.noroute=sunucu yöneltmesi yok
 torlauncher.bootstrapWarning.ioerror=okuma/yazma hatası
 torlauncher.bootstrapWarning.pt_missing=takılabilir aktarım bulunamadı
 
-torlauncher.nsresult.NS_ERROR_NET_RESET=The connection to the server was lost.
+torlauncher.nsresult.NS_ERROR_NET_RESET=Sunucuyla bağlantı kesildi
 torlauncher.nsresult.NS_ERROR_CONNECTION_REFUSED=Could not connect to the 
server.
 torlauncher.nsresult.NS_ERROR_PROXY_CONNECTION_REFUSED=Could not connect to 
the proxy.

___
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

2018-03-27 Thread translation
commit e6e271b7dd631ef82323fedd61a29ef6bcd4cbab
Author: Translation commit bot 
Date:   Tue Mar 27 14:46:34 2018 +

Update translations for tor-launcher-network-settings
---
 tr/network-settings.dtd | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tr/network-settings.dtd b/tr/network-settings.dtd
index add45616f..8a45e7708 100644
--- a/tr/network-settings.dtd
+++ b/tr/network-settings.dtd
@@ -41,8 +41,8 @@
 
 
 
-
-
+
+
 
 
 

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


[tor-commits] [metrics-web/master] Update news.json to version 246 of doc/MetricsTimeline.

2018-03-27 Thread karsten
commit e11c2962bf241f52023866373d597add77fd5882
Author: Karsten Loesing 
Date:   Mon Mar 26 11:48:36 2018 +0200

Update news.json to version 246 of doc/MetricsTimeline.
---
 src/main/resources/web/json/news.json | 167 +-
 1 file changed, 164 insertions(+), 3 deletions(-)

diff --git a/src/main/resources/web/json/news.json 
b/src/main/resources/web/json/news.json
index 8e103d7..2f72791 100644
--- a/src/main/resources/web/json/news.json
+++ b/src/main/resources/web/json/news.json
@@ -2826,6 +2826,21 @@
 ]
   },
   {
+"start": "2016-11-16",
+"shortDescription": "Tor Browser 6.5a4 is released",
+"description": "Tor Browser 6.5a4 is released. It changes the 
app.update.url.",
+"links": [
+  {
+"label": "blog post",
+"target": "https://blog.torproject.org/tor-browser-65a4-released;
+  },
+  {
+"label": "ticket",
+"target": "https://bugs.torproject.org/19481;
+  }
+]
+  },
+  {
 "start": "2016-11-18",
 "protocols": [
   "obfs4"
@@ -2937,6 +2952,20 @@
 ]
   },
   {
+"start": "2016-12-13",
+"protocols": [
+  "obfs4"
+],
+"shortDescription": "Tor Browser 6.5a6 is released",
+"description": "Tor Browser 6.5a6 is released. It fixes the 
app.update.url. It adds (uncomments) the default obfs4 bridge 
NX01:443. It activates timing obfuscation for certain obfs4 bridges. It changes 
the port of other obfs4 bridges.",
+"links": [
+  {
+"label": "blog post",
+"target": "https://blog.torproject.org/tor-browser-65a6-released;
+  }
+]
+  },
+  {
 "start": "2016-12-15",
 "ongoing": true,
 "places": [
@@ -3011,6 +3040,44 @@
 ]
   },
   {
+"start": "2017-01-24",
+"shortDescription": "Tor Browser 6.5 is released",
+"description": "Tor Browser 6.5 is released. It changes the 
app.update.url, which causes an apparent drop in update pings.",
+"links": [
+  {
+"label": "blog post",
+"target": "https://blog.torproject.org/tor-browser-65-released;
+  },
+  {
+"label": "graph",
+"target": 
"https://metrics.torproject.org/webstats-tb.html?start=2017-01-01=2017-06-01;
+  },
+  {
+"label": "ticket",
+"target": "https://bugs.torproject.org/19481;
+  },
+  {
+"label": "comment about app.update.url",
+"target": "https://bugs.torproject.org/22346#comment:1;
+  }
+]
+  },
+  {
+"start": "2017-01-25",
+"end": "2017-04-05",
+"protocols": [
+  "webstats"
+],
+"shortDescription": "Tor Browser update pings roughly halve",
+"description": "Tor Browser update pings roughly halve. The beginning 
corresponds with the release of Tor Browser 6.5.2, which changed the 
app.update.url. The end doesn't correspond to any release.",
+"links": [
+  {
+"label": "ticket",
+"target": "https://bugs.torproject.org/22346;
+  }
+]
+  },
+  {
 "start": "2017-02-10",
 "ongoing": true,
 "protocols": [
@@ -3182,6 +3249,41 @@
 ]
   },
   {
+"start": "2017-04-19",
+"protocols": [
+  "meek",
+  "obfs4"
+],
+"shortDescription": "Tor Browser 6.5.2 is released",
+"description": "Tor Browser 6.5.2 is released. It changes the 
app.update.url. It changes the meek-amazon backend. It adds the 
new default obfs4 bridges cymrubridge31:80 and cymrubridge33:80.",
+"links": [
+  {
+"label": "blog post",
+"target": "https://blog.torproject.org/tor-browser-652-released;
+  },
+  {
+"label": "comment about app.update.url",
+"target": "https://bugs.torproject.org/22346#comment:1;
+  }
+]
+  },
+  {
+"start": "2017-04-20",
+"protocols": [
+  "meek",
+  "obfs4",
+  "scramblesuit"
+],
+"shortDescription": "Tor Browser 7.0a3 is released",
+"description": "Tor Browser 7.0a3 is released. It changes the 
app.update.url. It removes the last remaining scramblesuit bridge. 
It changes the meek-amazon backend. It adds the new default obfs4 bridges 
cymrubridge31:80 and cymrubridge33:80.",
+"links": [
+  {
+"label": "blog post",
+"target": "https://blog.torproject.org/tor-browser-70a3-released;
+  }
+]
+  },
+  {
 "start": "2017-04-30",
 "protocols": [
   "meek"
@@ -4090,14 +4192,18 @@
   },
   {
 "start": "2017-12-28",
-"ongoing": true,
+"end": "2018-01-13",
 "places": [
   "ir"
 ],
-"shortDescription": "Protests in Iran, blocking of various services 
including Tor.",
-"description": "Protests in Iran, blocking of various services including 
Tor.",
+"shortDescription": "Protests in Iran, blocking of various services 
including Tor",
+"description": "Protests in Iran, blocking of various services including 
Tor. Instagram was unblocked 2018-01-06. Telegram was unblocked 2018-01-13.",
 "links": [
 

[tor-commits] [onionoo/master] Only unescape valid UTF.

2018-03-27 Thread karsten
commit 532ef3479a576733934edb45f588f2a074061f62
Author: iwakeh 
Date:   Thu Mar 15 13:58:17 2018 +

Only unescape valid UTF.

Add a utility method for only un-escaping valid utf and supply a test
as well as test data for this issue.

Fixes task-22594.
---
 CHANGELOG.md   |  8 
 .../org/torproject/onionoo/docs/DocumentStore.java |  4 +-
 .../torproject/onionoo/server/ResponseBuilder.java |  5 +--
 .../torproject/onionoo/util/FormattingUtils.java   | 34 +
 .../onionoo/util/FormattingUtilsTest.java  | 43 ++
 src/test/resources/lines-for-escape-tests.txt  | 16 
 6 files changed, 104 insertions(+), 6 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6fe389b..3a3c468 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+# Changes in version 5.1-1.12.0 - 2018-??-??
+
+ * Minor changes
+   - Don't attempt to un-escape character sequences in contact lines
+ (like "\uk") that only happen to start like escaped utf-8 characters
+ (like "\u0055").
+
+
 # Changes in version 5.1-1.11.0 - 2018-03-14
 
  * Medium changes
diff --git a/src/main/java/org/torproject/onionoo/docs/DocumentStore.java 
b/src/main/java/org/torproject/onionoo/docs/DocumentStore.java
index 4622a34..f1f3803 100644
--- a/src/main/java/org/torproject/onionoo/docs/DocumentStore.java
+++ b/src/main/java/org/torproject/onionoo/docs/DocumentStore.java
@@ -9,7 +9,6 @@ import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.JsonParseException;
 
-import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -318,8 +317,7 @@ public class DocumentStore {
* objects are escaped JSON, e.g., \u00F2.  When Gson serlializes
* this string, it escapes the \ to \\, hence writes \\u00F2.  We
* need to undo this and change \\u00F2 back to \u00F2. */
-  documentString = StringUtils.replace(gson.toJson(document),
-  "u", "\\u");
+  documentString = FormattingUtils.replaceValidUtf(gson.toJson(document));
   /* Existing details statuses don't contain opening and closing curly
* brackets, so we should remove them from new details statuses,
* too. */
diff --git a/src/main/java/org/torproject/onionoo/server/ResponseBuilder.java 
b/src/main/java/org/torproject/onionoo/server/ResponseBuilder.java
index bb36a2c..e2bdf82 100644
--- a/src/main/java/org/torproject/onionoo/server/ResponseBuilder.java
+++ b/src/main/java/org/torproject/onionoo/server/ResponseBuilder.java
@@ -12,12 +12,11 @@ import org.torproject.onionoo.docs.DocumentStoreFactory;
 import org.torproject.onionoo.docs.SummaryDocument;
 import org.torproject.onionoo.docs.UptimeDocument;
 import org.torproject.onionoo.docs.WeightsDocument;
+import org.torproject.onionoo.util.FormattingUtils;
 
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 
-import org.apache.commons.lang3.StringUtils;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -348,7 +347,7 @@ public class ResponseBuilder {
 /* Whenever we provide Gson with a string containing an escaped
  * non-ASCII character like \u00F2, it escapes the \ to \\, which
  * we need to undo before including the string in a response. */
-return StringUtils.replace(gson.toJson(dd), "u", "\\u");
+return FormattingUtils.replaceValidUtf(gson.toJson(dd));
   } else {
 // TODO We should probably log that we didn't find a details
 // document that we expected to exist.
diff --git a/src/main/java/org/torproject/onionoo/util/FormattingUtils.java 
b/src/main/java/org/torproject/onionoo/util/FormattingUtils.java
index 7ed1377..3d16f5a 100644
--- a/src/main/java/org/torproject/onionoo/util/FormattingUtils.java
+++ b/src/main/java/org/torproject/onionoo/util/FormattingUtils.java
@@ -3,8 +3,18 @@
 
 package org.torproject.onionoo.util;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/** Static helper methods for string processing etc. */
 public class FormattingUtils {
 
+  private static Logger log = LoggerFactory.getLogger(
+  FormattingUtils.class);
+
   private FormattingUtils() {
   }
 
@@ -35,5 +45,29 @@ public class FormattingUtils {
   public static String formatDecimalNumber(long decimalNumber) {
 return String.format("%,d", decimalNumber);
   }
+
+  private static Pattern escapePattern = Pattern.compile(
+   "({4}u[0-9a-fA-F]{4})");
+
+  /** De-escape only valid UTF and leave anything else escaped. */
+  public static String replaceValidUtf(String text) {
+if (null == text || text.isEmpty()) {
+  return text;
+}
+try {
+  StringBuffer sb = new StringBuffer();
+  Matcher mat = escapePattern.matcher(text);
+  while (mat.find()) {
+String 

[tor-commits] [tor/release-0.3.3] Merge branch 'maint-0.3.3' into release-0.3.3

2018-03-27 Thread nickm
commit d5580d9a2778ac399aa6db44ad602cf02e7c1dbe
Merge: 1f3e0f157 46c2b0ca2
Author: Nick Mathewson 
Date:   Tue Mar 27 07:05:15 2018 -0400

Merge branch 'maint-0.3.3' into release-0.3.3

 changes/bug25213   |  5 +
 src/or/circuitbuild.c  | 14 --
 src/test/test_hs_service.c |  4 
 3 files changed, 21 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/release-0.3.3] Fix a unit test which was broken by the previous commit

2018-03-27 Thread nickm
commit 969a38a375f4e71fcb27bb24e36047824d0f3cc9
Author: Nick Mathewson 
Date:   Mon Mar 26 09:57:39 2018 -0400

Fix a unit test which was broken by the previous commit

This test was expecting Tor to find and use routerinfos, but hadn't
cleared the UseMicrodescriptors flag.  Part of the fix for 25213.
---
 src/test/test_hs_service.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c
index d62fcc8ca..2e5280610 100644
--- a/src/test/test_hs_service.c
+++ b/src/test/test_hs_service.c
@@ -1237,6 +1237,10 @@ test_build_update_descriptors(void *arg)
 node->is_running = node->is_valid = node->is_fast = node->is_stable = 1;
   }
 
+  /* We have to set thise, or the lack of microdescriptors for these
+   * nodes will make them unusable. */
+  get_options_mutable()->UseMicrodescriptors = 0;
+
   /* We expect to pick only one intro point from the node above. */
   setup_full_capture_of_logs(LOG_INFO);
   update_all_descriptors(now);



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


[tor-commits] [tor/release-0.3.3] Merge branch 'bug25213_033' into maint-0.3.3

2018-03-27 Thread nickm
commit 46c2b0ca228d2d95666f28d4e42411dce0a59e15
Merge: 841ed9dbb 969a38a37
Author: Nick Mathewson 
Date:   Tue Mar 27 07:04:33 2018 -0400

Merge branch 'bug25213_033' into maint-0.3.3

 changes/bug25213   |  5 +
 src/or/circuitbuild.c  | 14 --
 src/test/test_hs_service.c |  4 
 3 files changed, 21 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/release-0.3.3] Make extend_info_from_node() more picky about node contents

2018-03-27 Thread nickm
commit d1874b433953f64b13a2feb0edc4bbff8940d503
Author: Nick Mathewson 
Date:   Mon Mar 26 09:56:12 2018 -0400

Make extend_info_from_node() more picky about node contents

This update is needed to make it consistent with the behavior of
node_awaiting_ipv6(), which doesn't believe in the addresses from
routerinfos unless it actually plans to use those routerinfos.

Fixes bug 25213; bugfix on b66b62fb7525cac1e1 in 0.3.3.1-alpha,
which tightened up the definition of node_awaiting_ipv6().
---
 changes/bug25213  |  5 +
 src/or/circuitbuild.c | 14 --
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/changes/bug25213 b/changes/bug25213
new file mode 100644
index 0..bb196ca72
--- /dev/null
+++ b/changes/bug25213
@@ -0,0 +1,5 @@
+  o Minor bugfixes (warnings, ipv6):
+- Avoid a bug warning that could occur when trying to connect to
+  a relay over IPv6 on a Tor instance that downloads router descriptors,
+  but prefers to use microdescriptors. Fixes bug 25213; bugfix on
+  0.3.3.1-alpha.
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 8fe6ba0e6..01921bac1 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2857,8 +2857,18 @@ extend_info_from_node(const node_t *node, int 
for_direct_connect)
   tor_addr_port_t ap;
   int valid_addr = 0;
 
-  if (node->ri == NULL && (node->rs == NULL || node->md == NULL))
-return NULL;
+  const int is_bridge = node_is_a_configured_bridge(node);
+  const int we_use_mds = we_use_microdescriptors_for_circuits(get_options());
+
+  if (is_bridge || !we_use_mds) {
+/* We need an ri in this case. */
+if (!node->ri)
+  return NULL;
+  } else {
+/* Otherwise we need an md. */
+if (node->rs == NULL || node->md == NULL)
+  return NULL;
+  }
 
   /* Choose a preferred address first, but fall back to an allowed address.
* choose_address returns 1 on success, but get_prim_orport returns 0. */



___
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.3.3'

2018-03-27 Thread nickm
commit 979c7e5c83531089aa4bf3998ae3353fbdd2031d
Merge: 0eed0899c 46c2b0ca2
Author: Nick Mathewson 
Date:   Tue Mar 27 07:05:15 2018 -0400

Merge branch 'maint-0.3.3'

 changes/bug25213   |  5 +
 src/or/circuitbuild.c  | 14 --
 src/test/test_hs_service.c |  4 
 3 files changed, 21 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/maint-0.3.3] Make extend_info_from_node() more picky about node contents

2018-03-27 Thread nickm
commit d1874b433953f64b13a2feb0edc4bbff8940d503
Author: Nick Mathewson 
Date:   Mon Mar 26 09:56:12 2018 -0400

Make extend_info_from_node() more picky about node contents

This update is needed to make it consistent with the behavior of
node_awaiting_ipv6(), which doesn't believe in the addresses from
routerinfos unless it actually plans to use those routerinfos.

Fixes bug 25213; bugfix on b66b62fb7525cac1e1 in 0.3.3.1-alpha,
which tightened up the definition of node_awaiting_ipv6().
---
 changes/bug25213  |  5 +
 src/or/circuitbuild.c | 14 --
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/changes/bug25213 b/changes/bug25213
new file mode 100644
index 0..bb196ca72
--- /dev/null
+++ b/changes/bug25213
@@ -0,0 +1,5 @@
+  o Minor bugfixes (warnings, ipv6):
+- Avoid a bug warning that could occur when trying to connect to
+  a relay over IPv6 on a Tor instance that downloads router descriptors,
+  but prefers to use microdescriptors. Fixes bug 25213; bugfix on
+  0.3.3.1-alpha.
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 8fe6ba0e6..01921bac1 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2857,8 +2857,18 @@ extend_info_from_node(const node_t *node, int 
for_direct_connect)
   tor_addr_port_t ap;
   int valid_addr = 0;
 
-  if (node->ri == NULL && (node->rs == NULL || node->md == NULL))
-return NULL;
+  const int is_bridge = node_is_a_configured_bridge(node);
+  const int we_use_mds = we_use_microdescriptors_for_circuits(get_options());
+
+  if (is_bridge || !we_use_mds) {
+/* We need an ri in this case. */
+if (!node->ri)
+  return NULL;
+  } else {
+/* Otherwise we need an md. */
+if (node->rs == NULL || node->md == NULL)
+  return NULL;
+  }
 
   /* Choose a preferred address first, but fall back to an allowed address.
* choose_address returns 1 on success, but get_prim_orport returns 0. */



___
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 'bug25213_033' into maint-0.3.3

2018-03-27 Thread nickm
commit 46c2b0ca228d2d95666f28d4e42411dce0a59e15
Merge: 841ed9dbb 969a38a37
Author: Nick Mathewson 
Date:   Tue Mar 27 07:04:33 2018 -0400

Merge branch 'bug25213_033' into maint-0.3.3

 changes/bug25213   |  5 +
 src/or/circuitbuild.c  | 14 --
 src/test/test_hs_service.c |  4 
 3 files changed, 21 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] Make extend_info_from_node() more picky about node contents

2018-03-27 Thread nickm
commit d1874b433953f64b13a2feb0edc4bbff8940d503
Author: Nick Mathewson 
Date:   Mon Mar 26 09:56:12 2018 -0400

Make extend_info_from_node() more picky about node contents

This update is needed to make it consistent with the behavior of
node_awaiting_ipv6(), which doesn't believe in the addresses from
routerinfos unless it actually plans to use those routerinfos.

Fixes bug 25213; bugfix on b66b62fb7525cac1e1 in 0.3.3.1-alpha,
which tightened up the definition of node_awaiting_ipv6().
---
 changes/bug25213  |  5 +
 src/or/circuitbuild.c | 14 --
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/changes/bug25213 b/changes/bug25213
new file mode 100644
index 0..bb196ca72
--- /dev/null
+++ b/changes/bug25213
@@ -0,0 +1,5 @@
+  o Minor bugfixes (warnings, ipv6):
+- Avoid a bug warning that could occur when trying to connect to
+  a relay over IPv6 on a Tor instance that downloads router descriptors,
+  but prefers to use microdescriptors. Fixes bug 25213; bugfix on
+  0.3.3.1-alpha.
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 8fe6ba0e6..01921bac1 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2857,8 +2857,18 @@ extend_info_from_node(const node_t *node, int 
for_direct_connect)
   tor_addr_port_t ap;
   int valid_addr = 0;
 
-  if (node->ri == NULL && (node->rs == NULL || node->md == NULL))
-return NULL;
+  const int is_bridge = node_is_a_configured_bridge(node);
+  const int we_use_mds = we_use_microdescriptors_for_circuits(get_options());
+
+  if (is_bridge || !we_use_mds) {
+/* We need an ri in this case. */
+if (!node->ri)
+  return NULL;
+  } else {
+/* Otherwise we need an md. */
+if (node->rs == NULL || node->md == NULL)
+  return NULL;
+  }
 
   /* Choose a preferred address first, but fall back to an allowed address.
* choose_address returns 1 on success, but get_prim_orport returns 0. */



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


[tor-commits] [tor/master] Fix a unit test which was broken by the previous commit

2018-03-27 Thread nickm
commit 969a38a375f4e71fcb27bb24e36047824d0f3cc9
Author: Nick Mathewson 
Date:   Mon Mar 26 09:57:39 2018 -0400

Fix a unit test which was broken by the previous commit

This test was expecting Tor to find and use routerinfos, but hadn't
cleared the UseMicrodescriptors flag.  Part of the fix for 25213.
---
 src/test/test_hs_service.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c
index d62fcc8ca..2e5280610 100644
--- a/src/test/test_hs_service.c
+++ b/src/test/test_hs_service.c
@@ -1237,6 +1237,10 @@ test_build_update_descriptors(void *arg)
 node->is_running = node->is_valid = node->is_fast = node->is_stable = 1;
   }
 
+  /* We have to set thise, or the lack of microdescriptors for these
+   * nodes will make them unusable. */
+  get_options_mutable()->UseMicrodescriptors = 0;
+
   /* We expect to pick only one intro point from the node above. */
   setup_full_capture_of_logs(LOG_INFO);
   update_all_descriptors(now);



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


[tor-commits] [tor/maint-0.3.3] Merge branch 'bug25213_033' into maint-0.3.3

2018-03-27 Thread nickm
commit 46c2b0ca228d2d95666f28d4e42411dce0a59e15
Merge: 841ed9dbb 969a38a37
Author: Nick Mathewson 
Date:   Tue Mar 27 07:04:33 2018 -0400

Merge branch 'bug25213_033' into maint-0.3.3

 changes/bug25213   |  5 +
 src/or/circuitbuild.c  | 14 --
 src/test/test_hs_service.c |  4 
 3 files changed, 21 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/maint-0.3.3] Fix a unit test which was broken by the previous commit

2018-03-27 Thread nickm
commit 969a38a375f4e71fcb27bb24e36047824d0f3cc9
Author: Nick Mathewson 
Date:   Mon Mar 26 09:57:39 2018 -0400

Fix a unit test which was broken by the previous commit

This test was expecting Tor to find and use routerinfos, but hadn't
cleared the UseMicrodescriptors flag.  Part of the fix for 25213.
---
 src/test/test_hs_service.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c
index d62fcc8ca..2e5280610 100644
--- a/src/test/test_hs_service.c
+++ b/src/test/test_hs_service.c
@@ -1237,6 +1237,10 @@ test_build_update_descriptors(void *arg)
 node->is_running = node->is_valid = node->is_fast = node->is_stable = 1;
   }
 
+  /* We have to set thise, or the lack of microdescriptors for these
+   * nodes will make them unusable. */
+  get_options_mutable()->UseMicrodescriptors = 0;
+
   /* We expect to pick only one intro point from the node above. */
   setup_full_capture_of_logs(LOG_INFO);
   update_all_descriptors(now);



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


[tor-commits] [metrics-lib/master] Use timeout of one minute for fetching index.

2018-03-27 Thread karsten
commit 56c906f4a0d8ddbc3dd5cab08e3ea548384bbd10
Author: iwakeh 
Date:   Mon Mar 19 10:58:38 2018 +

Use timeout of one minute for fetching index.

This is set for connect as well as read and can be overridden by
system properties sun.net.client.defaultTimeout.

Implements task-24290.
---
 .../java/org/torproject/descriptor/index/IndexNode.java | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/torproject/descriptor/index/IndexNode.java 
b/src/main/java/org/torproject/descriptor/index/IndexNode.java
index 4c4c884..19a5aa4 100644
--- a/src/main/java/org/torproject/descriptor/index/IndexNode.java
+++ b/src/main/java/org/torproject/descriptor/index/IndexNode.java
@@ -19,6 +19,7 @@ import java.io.InputStreamReader;
 import java.io.OutputStream;
 import java.io.Reader;
 import java.net.URL;
+import java.net.URLConnection;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.util.SortedMap;
@@ -37,6 +38,12 @@ public class IndexNode {
 
   private static Logger log = LoggerFactory.getLogger(IndexNode.class);
 
+  private static final int READ_TIMEOUT = Integer.parseInt(System
+  .getProperty("sun.net.client.defaultReadTimeout", "6"));
+
+  private static final int CONNECT_TIMEOUT = Integer.parseInt(System
+  .getProperty("sun.net.client.defaultConnectTimeout", "6"));
+
   /** An empty node, which is not added to JSON output. */
   public static final IndexNode emptyNode = new IndexNode("", "",
   new TreeSet(), new TreeSet());
@@ -97,8 +104,12 @@ public class IndexNode {
   public static IndexNode fetchIndex(String urlString) throws Exception {
 String ending
 = urlString.substring(urlString.lastIndexOf(".") + 1).toUpperCase();
+URLConnection connection = (new URL(urlString)).openConnection();
+connection.setReadTimeout(READ_TIMEOUT);
+connection.setConnectTimeout(CONNECT_TIMEOUT);
+connection.connect();
 try (InputStream is = FileType.valueOf(ending)
-.inputStream(new URL(urlString).openStream())) {
+.inputStream(connection.getInputStream())) {
   return fetchIndex(is);
 }
   }



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


[tor-commits] [metrics-lib/master] Add change log entry for #24290.

2018-03-27 Thread karsten
commit f826234e8064014487d871838e8074e83a142e42
Author: Karsten Loesing 
Date:   Tue Mar 27 09:25:35 2018 +0200

Add change log entry for #24290.
---
 CHANGELOG.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index d8576e3..58235e3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,8 @@
  * Minor changes.
- Override logLines() method from LogDescriptor in
  WebServerAccessLog.
+   - Use 1-minute connect and read timeouts for fetching CollecTor's
+ index.json.
 
 
 # Changes in version 2.2.0 - 2018-02-26

___
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-52.7.3esr-8.0-1] Revert "Orfox: Fix #1 - Improve build instructions"

2018-03-27 Thread gk
commit cc4c7e19e9474e423aebbc00be898824f27d496a
Author: Georg Koppen 
Date:   Tue Mar 27 06:25:17 2018 +

Revert "Orfox: Fix #1 - Improve build instructions"

This reverts commit c981d290167b8547789849194ed12dd763f1f892.
---
 README.md  | 20 
 README.txt | 27 +++
 2 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/README.md b/README.md
deleted file mode 100644
index 8cf5ca26625a..
--- a/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-## ORFOX BUILD STEPS:
-
-1) Move .mozconfig-android to .mozconfig OR run: 
-```
-export MOZCONFIG="tor-browser/.mozconfig-android"
-```
-2) Checks if the all requirements for the build are fine with:
-```
-./mach configure
-```
-3) Builds the repo with:
-```
-./mach build
-```
-4) Creates the apk in 
tor-browser/MOZ_OBJDIR/dist/fennec-38.0.en-US.android-arm.apk
-```
-./mach package
-```
-### Note: this does not ship the addons, that is managed in a different repo: 
https://github.com/amoghbl1/orfox-addons.
-### Steps to include these addons can be figured out looking at the jenkins 
script at https://github.com/amoghbl1/Orfox/blob/master/jenkins-build
diff --git a/README.txt b/README.txt
new file mode 100644
index ..658c0dce3174
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,27 @@
+An explanation of the Mozilla Source Code Directory Structure and links to
+project pages with documentation can be found at:
+
+https://developer.mozilla.org/en/Mozilla_Source_Code_Directory_Structure
+
+For information on how to build Mozilla from the source code, see:
+
+http://developer.mozilla.org/en/docs/Build_Documentation
+
+To have your bug fix / feature added to Mozilla, you should create a patch and
+submit it to Bugzilla (https://bugzilla.mozilla.org). Instructions are at:
+
+http://developer.mozilla.org/en/docs/Creating_a_patch
+http://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree
+
+If you have a question about developing Mozilla, and can't find the solution
+on http://developer.mozilla.org, you can try asking your question in a
+mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups
+are accessible on Google Groups, or news.mozilla.org with a NNTP reader.]
+
+You can download nightly development builds from the Mozilla FTP server.
+Keep in mind that nightly builds, which are used by Mozilla developers for
+testing, may be buggy. Firefox nightlies, for example, can be found at:
+
+https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
+- or -
+http://nightly.mozilla.org/

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