commit 026f0c718410ec1f0f5f094943fbe5ceef1e632d
parent 3f20a69afb666e4dcd43e2f9182692502300a58d
Author: Alexander Færøy <ahf@torproject.org>
Date: Wed, 15 Jan 2020 17:21:10 +0000
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:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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;
}