From a4cdb834b9896a1a0864506ee8a084135945dd53 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Thu, 25 May 2006 20:06:09 +0000 Subject: [PATCH] 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 --- src/common/util.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common/util.c b/src/common/util.c index 433dd7d7fb..b507691521 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 name looks like it might be a hostname or IP - * address of some kind. */ +/* Return true iff name 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; }