aboutsummaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2021-06-10 12:30:30 -0400
committerNick Mathewson <nickm@torproject.org>2021-06-10 12:30:30 -0400
commitec677c0c2e28e20ca6a72488f5d30739e94fe048 (patch)
tree286051d53793489c5869d01f4957262ec77374cf /src/feature
parent0667eaa9bfdd18fe602f964840d662c0b934247a (diff)
parent8e590992c4aae8e45b4b9aa4065c8b7741c2a3d6 (diff)
downloadtor-ec677c0c2e28e20ca6a72488f5d30739e94fe048.tar.gz
tor-ec677c0c2e28e20ca6a72488f5d30739e94fe048.zip
Merge branch 'maint-0.4.6'
Diffstat (limited to 'src/feature')
-rw-r--r--src/feature/hs/hs_descriptor.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/feature/hs/hs_descriptor.c b/src/feature/hs/hs_descriptor.c
index 10eca2176b..70ff4e9690 100644
--- a/src/feature/hs/hs_descriptor.c
+++ b/src/feature/hs/hs_descriptor.c
@@ -136,7 +136,7 @@ static token_rule_t hs_desc_superencrypted_v3_token_table[] = {
/** Descriptor ruleset for the encrypted section. */
static token_rule_t hs_desc_encrypted_v3_token_table[] = {
T1_START(str_create2_formats, R3_CREATE2_FORMATS, CONCAT_ARGS, NO_OBJ),
- T01(str_intro_auth_required, R3_INTRO_AUTH_REQUIRED, ARGS, NO_OBJ),
+ T01(str_intro_auth_required, R3_INTRO_AUTH_REQUIRED, GE(1), NO_OBJ),
T01(str_single_onion, R3_SINGLE_ONION_SERVICE, ARGS, NO_OBJ),
END_OF_TABLE
};
@@ -2321,6 +2321,7 @@ desc_decode_encrypted_v3(const hs_descriptor_t *desc,
/* Authentication type. It's optional but only once. */
tok = find_opt_by_keyword(tokens, R3_INTRO_AUTH_REQUIRED);
if (tok) {
+ tor_assert(tok->n_args >= 1);
if (!decode_auth_type(desc_encrypted_out, tok->args[0])) {
log_warn(LD_REND, "Service descriptor authentication type has "
"invalid entry(ies).");