mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Now NodeFamily and MyFamily config options allow spaces in
identity fingerprints, so it's easier to paste them in. Suggested by Lucky Green. svn:r17021
This commit is contained in:
+5
-2
@@ -3740,7 +3740,7 @@ get_default_conf_file(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
/** Verify whether lst is a string containing valid-looking space-separated
|
||||
/** Verify whether lst is a string containing valid-looking comma-separated
|
||||
* nicknames, or NULL. Return 0 on success. Warn and return -1 on failure.
|
||||
*/
|
||||
static int
|
||||
@@ -3752,7 +3752,10 @@ check_nickname_list(const char *lst, const char *name, char **msg)
|
||||
if (!lst)
|
||||
return 0;
|
||||
sl = smartlist_create();
|
||||
smartlist_split_string(sl, lst, ",", SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
|
||||
|
||||
smartlist_split_string(sl, lst, ",",
|
||||
SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK|SPLIT_STRIP_SPACE, 0);
|
||||
|
||||
SMARTLIST_FOREACH(sl, const char *, s,
|
||||
{
|
||||
if (!is_legal_nickname_or_hexdigest(s)) {
|
||||
|
||||
+1
-1
@@ -1313,7 +1313,7 @@ router_rebuild_descriptor(int force)
|
||||
family = smartlist_create();
|
||||
ri->declared_family = smartlist_create();
|
||||
smartlist_split_string(family, options->MyFamily, ",",
|
||||
SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
|
||||
SPLIT_SKIP_SPACE|SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
|
||||
SMARTLIST_FOREACH(family, char *, name,
|
||||
{
|
||||
routerinfo_t *member;
|
||||
|
||||
+1
-1
@@ -1324,7 +1324,7 @@ router_nickname_is_in_list(routerinfo_t *router, const char *list)
|
||||
|
||||
nickname_list = smartlist_create();
|
||||
smartlist_split_string(nickname_list, list, ",",
|
||||
SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
|
||||
SPLIT_SKIP_SPACE|SPLIT_STRIP_SPACE|SPLIT_IGNORE_BLANK, 0);
|
||||
SMARTLIST_FOREACH(nickname_list, const char *, cp,
|
||||
if (router_nickname_matches(router, cp)) {v=1;break;});
|
||||
SMARTLIST_FOREACH(nickname_list, char *, cp, tor_free(cp));
|
||||
|
||||
Reference in New Issue
Block a user