summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2008-06-13 18:58:58 +0000
committerPeter Palfrader <peter@palfrader.org>2008-06-13 18:58:58 +0000
commit1f3dc9b22b39257e433282039ffd20adf161af6d (patch)
tree78686c6c74523875e303cfedea272f75e49df339
parentf9fd049f69ce07210e9a256d22a976305256b751 (diff)
downloadtor-1f3dc9b22b39257e433282039ffd20adf161af6d.tar.gz
tor-1f3dc9b22b39257e433282039ffd20adf161af6d.zip
Asking for a conditional consensus at .../consensus/<fingerprints> would crash
a dirserver if it did not already have a consensus. svn:r15227
-rw-r--r--ChangeLog3
-rw-r--r--src/or/directory.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 73b496c16c..a446172dea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
Changes in version 0.2.1.2-alpha - 2008-??-??
o Minor features:
- Allow OpenSSL to use dynamic locks if it wants.
+ o Bugfixes:
+ - Asking for a conditional consensus at .../consensus/<fingerprints>
+ would crash a dirserver if it did not already have a consensus.
Changes in version 0.2.1.1-alpha - 2008-06-13
o Major features:
diff --git a/src/or/directory.c b/src/or/directory.c
index 1cf6f2b38d..419891fd7f 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -2493,7 +2493,8 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers,
networkstatus_t *v = networkstatus_get_latest_consensus();
time_t now = time(NULL);
#define CONSENSUS_URL_PREFIX "/tor/status-vote/current/consensus/"
- if (!strcmpstart(url, CONSENSUS_URL_PREFIX) &&
+ if (v &&
+ !strcmpstart(url, CONSENSUS_URL_PREFIX) &&
!client_likes_consensus(v, url + strlen(CONSENSUS_URL_PREFIX))) {
write_http_status_line(conn, 404, "Consensus not signed by sufficient "
"number of requested authorities");
@@ -3430,3 +3431,4 @@ dir_split_resource_into_fingerprints(const char *resource,
return 0;
}
+/* vim:set et ts=2: */