mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Fix CID 1473233 in handle_control_hsfetch().
With v2 support for HSFETCH gone, we only support v3 addresses. We don't support v2 descriptor IDs anymore and hence we can remove that code. The code removed would ensure that if a v2 descriptor ID was provided, the user also had to provide HSDirs explicitly. In the v3 case, the code should work even if no HSDirs are provided, and Tor would find the HSDirs itself.
This commit is contained in:
parent
8ccfd4a51a
commit
c0a2330314
@ -1437,7 +1437,6 @@ handle_control_hsfetch(control_connection_t *conn,
|
||||
const control_cmd_args_t *args)
|
||||
|
||||
{
|
||||
char *desc_id = NULL;
|
||||
smartlist_t *hsdirs = NULL;
|
||||
ed25519_public_key_t v3_pk;
|
||||
uint32_t version;
|
||||
@ -1474,13 +1473,6 @@ handle_control_hsfetch(control_connection_t *conn,
|
||||
}
|
||||
}
|
||||
|
||||
/* Using a descriptor ID, we force the user to provide at least one
|
||||
* hsdir server using the SERVER= option. */
|
||||
if (desc_id && (!hsdirs || !smartlist_len(hsdirs))) {
|
||||
control_write_endreply(conn, 512, "SERVER option is required");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* We are about to trigger HSDir fetch so send the OK now because after
|
||||
* that 650 event(s) are possible so better to have the 250 OK before them
|
||||
* to avoid out of order replies. */
|
||||
|
Loading…
Reference in New Issue
Block a user