diff options
author | Nick Mathewson <nickm@torproject.org> | 2021-06-10 12:30:29 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2021-06-10 12:30:29 -0400 |
commit | 200e9a55e0737294085080052fbbaba4340d6717 (patch) | |
tree | 3121acd970d42b3f7a659f4517b260d0dd13d07e /src/feature | |
parent | ae2254e490ebfed746bed7e5ec359737cbb14085 (diff) | |
parent | 0ae9fd62fdc5ffd41bf5bbf2f4a3c1e2a151fa2d (diff) | |
download | tor-200e9a55e0737294085080052fbbaba4340d6717.tar.gz tor-200e9a55e0737294085080052fbbaba4340d6717.zip |
Merge branch 'maint-0.4.4' into maint-0.4.5
Diffstat (limited to 'src/feature')
-rw-r--r-- | src/feature/hs/hs_descriptor.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/feature/hs/hs_descriptor.c b/src/feature/hs/hs_descriptor.c index 0656224e48..6e448b322e 100644 --- a/src/feature/hs/hs_descriptor.c +++ b/src/feature/hs/hs_descriptor.c @@ -137,7 +137,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 }; @@ -2322,6 +2322,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)."); |