r17095@catbus: nickm | 2007-12-11 18:11:13 -0500

Backport r12766: Patch from mwenge: fix consensus status lookup by nickname when nickname is a hexdigest.


svn:r12770
This commit is contained in:
Nick Mathewson 2007-12-11 23:17:06 +00:00
parent 1acfe321f8
commit 9a3597c418
2 changed files with 5 additions and 2 deletions

View File

@ -88,6 +88,9 @@ Changes in version 0.1.2.18 - 2007-10-28
is fishy. Resolves bug 463.
- Don't reset trusted dir server list when we set a configuration
option. Patch from Robert Hogan.
- Fix handling of hex nicknames when answering controller requests for
networkstatus by name, or when deciding whether to warn about unknown
routers in a config option. (Patch from mwenge.)
Changes in version 0.1.2.17 - 2007-08-30

View File

@ -2845,11 +2845,11 @@ router_get_combined_status_by_nickname(const char *nickname,
return NULL;
if (nickname[0] == '$') {
if (base16_decode(digest, DIGEST_LEN, nickname+1, strlen(nickname))<0)
if (base16_decode(digest, DIGEST_LEN, nickname+1, strlen(nickname+1))<0)
return NULL;
return router_get_combined_status_by_digest(digest);
} else if (strlen(nickname) == HEX_DIGEST_LEN &&
(base16_decode(digest, DIGEST_LEN, nickname+1, strlen(nickname))==0)) {
(base16_decode(digest, DIGEST_LEN, nickname, strlen(nickname))==0)) {
return router_get_combined_status_by_digest(digest);
}