Browse Source

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

Roger Dingledine 19 years ago
parent
commit
a4cdb834b9
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/common/util.c

+ 5 - 2
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;
 }