[tor-commits] [tor/master] Make BridgeDistribution setting validator case-insensitive.
dgoulet at torproject.org
dgoulet at torproject.org
Mon Jan 20 15:46:19 UTC 2020
commit 026f0c718410ec1f0f5f094943fbe5ceef1e632d
Author: Alexander Færøy <ahf at torproject.org>
Date: Wed Jan 15 17:21:10 2020 +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
---
src/feature/relay/relay_config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/feature/relay/relay_config.c b/src/feature/relay/relay_config.c
index 9895485c8..b919e5600 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;
}
More information about the tor-commits
mailing list