aboutsummaryrefslogtreecommitdiff
path: root/src/feature/relay
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2020-01-15 17:21:10 +0000
committerAlexander Færøy <ahf@torproject.org>2020-01-15 17:21:10 +0000
commit026f0c718410ec1f0f5f094943fbe5ceef1e632d (patch)
treeec0a7665151b73ab14e24a7c358867c6949fe463 /src/feature/relay
parent3f20a69afb666e4dcd43e2f9182692502300a58d (diff)
downloadtor-026f0c718410ec1f0f5f094943fbe5ceef1e632d.tar.gz
tor-026f0c718410ec1f0f5f094943fbe5ceef1e632d.zip
Make BridgeDistribution setting validator case-insensitive.
This patch makes sure that we accept values such as "nOne", "None", and "AnY" as valid values for BridgeDistribution. We later ensure to lower-case the values before they are forwarded to the BridgeDB. See: https://bugs.torproject.org/32753
Diffstat (limited to 'src/feature/relay')
-rw-r--r--src/feature/relay/relay_config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/feature/relay/relay_config.c b/src/feature/relay/relay_config.c
index 9895485c83..b919e5600b 100644
--- a/src/feature/relay/relay_config.c
+++ b/src/feature/relay/relay_config.c
@@ -485,7 +485,7 @@ check_bridge_distribution_setting(const char *bd)
};
unsigned i;
for (i = 0; i < ARRAY_LENGTH(RECOGNIZED); ++i) {
- if (!strcmp(bd, RECOGNIZED[i]))
+ if (!strcasecmp(bd, RECOGNIZED[i]))
return 0;
}