浏览代码

Merge remote-tracking branch 'origin/maint-0.2.2'

Conflicts:
	src/or/circuitbuild.c
Nick Mathewson 13 年之前
父节点
当前提交
9f88c1e14f
共有 2 个文件被更改,包括 8 次插入0 次删除
  1. 3 0
      changes/bug5342
  2. 5 0
      src/or/circuitbuild.c

+ 3 - 0
changes/bug5342

@@ -0,0 +1,3 @@
+  o Security fixes:
+    - Never use a bridge as an exit, even if it claims to be one.  Found by
+      wanoskarnet. Fixes bug 5342. Bugfix on ????.

+ 5 - 0
src/or/circuitbuild.c

@@ -2719,6 +2719,11 @@ choose_good_exit_server_general(int need_uptime, int need_capacity)
       n_supported[i] = -1;
       continue; /* skip routers that are known to be down or bad exits */
     }
+    if (node_get_purpose(node) != ROUTER_PURPOSE_GENERAL) {
+      /* never pick a non-general node as a random exit. */
+      n_supported[i] = -1;
+      continue;
+    }
     if (routerset_contains_node(options->_ExcludeExitNodesUnion, node)) {
       n_supported[i] = -1;
       continue; /* user asked us not to use it, no matter what */