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
David Goulet
Tor
Commits
b444096b
Commit
b444096b
authored
May 06, 2020
by
Nick Mathewson
🐻
Browse files
Fix a boolean logic error when logging about invalid hostnames.
Fixes bug 34131; bugfix on 0.4.3.1-alpha.
parent
b7fcbb28
Changes
2
Hide whitespace changes
Inline
Side-by-side
changes/bug34131
0 → 100644
View file @
b444096b
o Minor bugfixes (logging):
- Fix a logic error in a log message about whether an address was
invalid. Previously, the code would never report that onion addresses
were onion addresses. Fixes bug 34131; bugfix on 0.4.3.1-alpha.
src/core/or/connection_edge.c
View file @
b444096b
...
...
@@ -1643,9 +1643,11 @@ parse_extended_hostname(char *address, hostname_type_t *type_out)
failed:
/* otherwise, return to previous state and return 0 */
*
s
=
'.'
;
const
bool
is_onion
=
(
*
type_out
==
ONION_V2_HOSTNAME
)
||
(
*
type_out
==
ONION_V3_HOSTNAME
);
log_warn
(
LD_APP
,
"Invalid %shostname %s; rejecting"
,
(
*
type_out
==
(
ONION_V2_HOSTNAME
||
ONION_V3_HOSTNAME
)
?
"onion "
:
""
)
,
safe_str_client
(
address
));
is_onion
?
"onion "
:
""
,
safe_str_client
(
address
));
return
false
;
}
...
...
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