summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-11 11:24:55 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-18 15:00:53 -0400
commit8ee1fe7aa76e0d5cb8704e397aa4cd81c875f1a1 (patch)
treee4852e4865b94de6c4eff545a692a3a7669ace6f
parentdcee4d4c9cc7d98e5ae8e913c73a3afc41753c64 (diff)
downloadtor-8ee1fe7aa76e0d5cb8704e397aa4cd81c875f1a1.tar.gz
tor-8ee1fe7aa76e0d5cb8704e397aa4cd81c875f1a1.zip
Warn when an authority has voted for a version with a space in it.
Another way to try to prevent a recurrence of 26485.
-rw-r--r--src/or/dirvote.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index 738ab35bc1..e6a745612e 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -673,6 +673,14 @@ compute_consensus_versions_list(smartlist_t *lst, int n_versioning)
int min = n_versioning / 2;
smartlist_t *good = smartlist_new();
char *result;
+ SMARTLIST_FOREACH_BEGIN(lst, const char *, v) {
+ if (strchr(v, ' ')) {
+ log_warn(LD_DIR, "At least one authority has voted for a version %s "
+ "that contains a space. This probably wasn't intentional, and "
+ "is likely to cause trouble. Please tell them to stop it.",
+ escaped(v));
+ }
+ } SMARTLIST_FOREACH_END(v);
sort_version_list(lst, 0);
get_frequent_members(good, lst, min);
result = smartlist_join_strings(good, ",", 0, NULL);
@@ -4002,4 +4010,3 @@ vote_routerstatus_find_microdesc_hash(char *digest256_out,
}
return -1;
}
-