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
This commit is contained in:
Alexander Færøy
2020-01-15 17:21:10 +00:00
parent 3f20a69afb
commit 026f0c7184
+1 -1
View File
@@ -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;
}