From: Alexander Færøy Date: Wed, 15 Jan 2020 17:21:10 +0000 (+0000) Subject: Make BridgeDistribution setting validator case-insensitive. X-Git-Tag: tor-0.4.3.1-alpha~10^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=026f0c718410ec1f0f5f094943fbe5ceef1e632d;p=thirdparty%2Ftor.git 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 --- 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; }