Stop being picky about what the arguments to mapaddress look like.

we were refusing names that had $ in them, which people who specify
$key.exit will be sad about. There are likely other examples.
If people can think of reasons why we should be picky, let me know.


svn:r6496
This commit is contained in:
Roger Dingledine 2006-05-25 20:06:09 +00:00
parent 3cd01ca9a1
commit a4cdb834b9

View File

@ -1697,8 +1697,9 @@ tor_dup_addr(uint32_t addr)
return tor_strdup(buf);
}
/* Return true iff <b>name</b> looks like it might be a hostname or IP
* address of some kind. */
/* Return true iff <b>name</b> looks like it might be a hostname,
* nickname, key, or IP address of some kind, suitable for the
* controller's "mapaddress" command. */
int
is_plausible_address(const char *name)
{
@ -1707,10 +1708,12 @@ is_plausible_address(const char *name)
/* We could check better here. */
if (!*name)
return 0;
#if 0
for (cp=name; *cp; cp++) {
if (*cp != '.' && *cp != '-' && !TOR_ISALNUM(*cp))
return 0;
}
#endif
return 1;
}