summaryrefslogtreecommitdiff
path: root/src/feature/hs
diff options
context:
space:
mode:
authorNeel Chauhan <neel@neelc.org>2020-12-08 11:24:27 -0800
committerNeel Chauhan <neel@neelc.org>2020-12-08 11:24:27 -0800
commit8a2910461baffbf4c83905776ec2f0aa7abe23a3 (patch)
tree6abff93e5e7b449d972ffada4072b0433e5751b1 /src/feature/hs
parent65d60a16d96ad6e7f824225e3b9b109783575379 (diff)
downloadtor-8a2910461baffbf4c83905776ec2f0aa7abe23a3.tar.gz
tor-8a2910461baffbf4c83905776ec2f0aa7abe23a3.zip
Reinstate add_onion_helper_add_service() test, validate auth clients before adding them
Diffstat (limited to 'src/feature/hs')
-rw-r--r--src/feature/hs/hs_service.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c
index eb4e3c2b78..449870d3ba 100644
--- a/src/feature/hs/hs_service.c
+++ b/src/feature/hs/hs_service.c
@@ -3755,7 +3755,13 @@ hs_service_add_ephemeral(ed25519_secret_key_t *sk, smartlist_t *ports,
}
if (auth_clients_v3) {
- service->config.clients = auth_clients_v3;
+ service->config.clients = smartlist_new();
+ SMARTLIST_FOREACH(auth_clients_v3, hs_service_authorized_client_t *, c, {
+ if (c != NULL) {
+ smartlist_add(service->config.clients, c);
+ }
+ });
+ smartlist_free(auth_clients_v3);
}
/* Build the onion address for logging purposes but also the control port