diff options
-rw-r--r-- | src/common/util.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/util.c b/src/common/util.c index 433dd7d7f..b50769152 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -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; } |