diff options
author | Roger Dingledine <arma@torproject.org> | 2006-06-13 12:05:59 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-06-13 12:05:59 +0000 |
commit | 2cd349903c626899a3b6a12f4f8806801ebe002d (patch) | |
tree | fac5195c9562e47f24797d011f394e3e73a224c4 /src/or | |
parent | b4e415ba3c43e815f4eab2a09dde59ecc4aabdb3 (diff) | |
download | tor-2cd349903c626899a3b6a12f4f8806801ebe002d.tar.gz tor-2cd349903c626899a3b6a12f4f8806801ebe002d.zip |
be more lax about recognizing valid hexdigests.
svn:r6619
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/router.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/router.c b/src/or/router.c index ee4cba30cf..47224de14b 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -1230,10 +1230,10 @@ is_legal_hexdigest(const char *s) { size_t len; tor_assert(s); + if (s[0] == '$') s++; len = strlen(s); - return (len == HEX_DIGEST_LEN+1 && - s[0] == '$' && - strspn(s+1,HEX_CHARACTERS)==len-1); + return (len == HEX_DIGEST_LEN && + strspn(s,HEX_CHARACTERS)==len); } /** Forget that we have issued any router-related warnings, so that we'll |