[or-cvs] Stop being picky about what the arguments to mapaddress loo...
arma at seul.org
arma at seul.org
Thu May 25 20:06:11 UTC 2006
Update of /home2/or/cvsroot/tor/src/common
In directory moria:/home/arma/work/onion/cvs/tor/src/common
Modified Files:
util.c
Log Message:
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.
Index: util.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/common/util.c,v
retrieving revision 1.256
retrieving revision 1.257
diff -u -p -d -r1.256 -r1.257
--- util.c 10 May 2006 10:24:17 -0000 1.256
+++ util.c 25 May 2006 20:06:09 -0000 1.257
@@ -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;
}
More information about the tor-commits
mailing list