|
@@ -4572,8 +4572,7 @@ rend_parse_v2_service_descriptor(rend_service_descriptor_t **parsed_out,
|
|
|
tok = find_by_keyword(tokens, R_RENDEZVOUS_SERVICE_DESCRIPTOR);
|
|
|
tor_assert(tok == smartlist_get(tokens, 0));
|
|
|
tor_assert(tok->n_args == 1);
|
|
|
- if (strlen(tok->args[0]) != REND_DESC_ID_V2_LEN_BASE32 ||
|
|
|
- strspn(tok->args[0], BASE32_CHARS) != REND_DESC_ID_V2_LEN_BASE32) {
|
|
|
+ if (!rend_valid_descriptor_id(tok->args[0])) {
|
|
|
log_warn(LD_REND, "Invalid descriptor ID: '%s'", tok->args[0]);
|
|
|
goto err;
|
|
|
}
|