diff options
author | Roger Dingledine <arma@torproject.org> | 2004-04-05 00:47:48 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-04-05 00:47:48 +0000 |
commit | 7793078dffae64d8d4574a37c6ffa40fb54637c9 (patch) | |
tree | b988080813729ccd28d572bce44e032398bec00a /src/or/config.c | |
parent | a9813f0210bbf723e19b24c73fb93ecc436efcfb (diff) | |
download | tor-7793078dffae64d8d4574a37c6ffa40fb54637c9.tar.gz tor-7793078dffae64d8d4574a37c6ffa40fb54637c9.zip |
alice can now look up bob's service descriptor,
choose an intro point, connect to it,
choose a rend point, connect to it and establish a cookie,
get an ack from the rendezvous point,
and know when both circs are ready for her.
APConns don't use conn->purpose anymore
don't initiate a renddesc lookup if one is already in progress
also fix a buffer overflow in nickname parsing (only exploitable
by the operator though)
svn:r1471
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/or/config.c b/src/or/config.c index ad121d3ccc..93adb5437e 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -596,10 +596,17 @@ int getconfig(int argc, char **argv, or_options_t *options) { if (options->Nickname == NULL) { log_fn(LOG_WARN,"Nickname required if ORPort is set, but not found."); result = -1; - } else if (strspn(options->Nickname, LEGAL_NICKNAME_CHARACTERS) != - strlen(options->Nickname)) { - log_fn(LOG_WARN, "Nickname '%s' contains illegal characters.", options->Nickname); - result = -1; + } else { + if (strspn(options->Nickname, LEGAL_NICKNAME_CHARACTERS) != + strlen(options->Nickname)) { + log_fn(LOG_WARN, "Nickname '%s' contains illegal characters.", options->Nickname); + result = -1; + } + if (strlen(options->Nickname) > MAX_NICKNAME_LEN) { + log_fn(LOG_WARN, "Nickname '%s' has more than %d characters.", + options->Nickname, MAX_NICKNAME_LEN); + result = -1; + } } } @@ -654,6 +661,10 @@ int getconfig(int argc, char **argv, or_options_t *options) { result = -1; } + /* XXX look at the various nicknamelists and make sure they're + * valid and don't have hostnames that are too long. + */ + if (rend_config_services(options) < 0) { result = -1; } |