Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mike Perry
Tor
Commits
568a4e0a
Commit
568a4e0a
authored
Mar 20, 2004
by
Roger Dingledine
Browse files
warn and fail if server chose a nickname with illegal characters
svn:r1318
parent
4f0bad28
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/or/config.c
View file @
568a4e0a
...
...
@@ -568,9 +568,15 @@ int getconfig(int argc, char **argv, or_options_t *options) {
result
=
-
1
;
}
if
(
options
->
ORPort
&&
options
->
Nickname
==
NULL
)
{
log_fn
(
LOG_WARN
,
"Nickname required if ORPort is set, but not found."
);
result
=
-
1
;
if
(
options
->
ORPort
)
{
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
;
}
}
if
(
options
->
ORPort
)
{
/* get an IP for ourselves */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment