mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 14:51:11 +01:00
be more lax about recognizing valid hexdigests.
svn:r6619
This commit is contained in:
parent
b4e415ba3c
commit
2cd349903c
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue