mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 07:03:44 +01:00
Fix a remaining bug in Robert's bug1859 fix.
When intro->extend_info is created for an introduction point, it only starts out with a nickname, not necessarily an identity digest. Thus, doing router_get_by_digest isn't necessarily safe.
This commit is contained in:
parent
5cd7953a21
commit
2392290c18
@ -810,6 +810,9 @@ rend_client_get_random_intro(const rend_data_t *rend_query)
|
|||||||
intro = smartlist_get(entry->parsed->intro_nodes, i);
|
intro = smartlist_get(entry->parsed->intro_nodes, i);
|
||||||
/* Do we need to look up the router or is the extend info complete? */
|
/* Do we need to look up the router or is the extend info complete? */
|
||||||
if (!intro->extend_info->onion_key) {
|
if (!intro->extend_info->onion_key) {
|
||||||
|
if (tor_digest_is_zero(intro->extend_info->identity_digest))
|
||||||
|
router = router_get_by_hexdigest(intro->extend_info->nickname);
|
||||||
|
else
|
||||||
router = router_get_by_digest(intro->extend_info->identity_digest);
|
router = router_get_by_digest(intro->extend_info->identity_digest);
|
||||||
if (!router) {
|
if (!router) {
|
||||||
log_info(LD_REND, "Unknown router with nickname '%s'; trying another.",
|
log_info(LD_REND, "Unknown router with nickname '%s'; trying another.",
|
||||||
|
Loading…
Reference in New Issue
Block a user