mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 07:03:44 +01:00
Always escape BridgeDistribution value from torrc in descriptors.
When the BridgeDistribution value was added in commit
ebab521525
the check for whether the value
contains '\n' or '\r' was added as a requirement for whether or not the
value should be escaped.
This patch removes this check and makes sure we call `escaped()` on the
value every time before we add it to a descriptor.
See: https://bugs.torproject.org/32753
This commit is contained in:
parent
5fa7c1b13f
commit
3f20a69afb
@ -2914,9 +2914,8 @@ router_dump_router_to_string(routerinfo_t *router,
|
|||||||
} else {
|
} else {
|
||||||
bd = "any";
|
bd = "any";
|
||||||
}
|
}
|
||||||
if (strchr(bd, '\n') || strchr(bd, '\r'))
|
smartlist_add_asprintf(chunks, "bridge-distribution-request %s\n",
|
||||||
bd = escaped(bd);
|
escaped(bd));
|
||||||
smartlist_add_asprintf(chunks, "bridge-distribution-request %s\n", bd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (router->onion_curve25519_pkey) {
|
if (router->onion_curve25519_pkey) {
|
||||||
|
Loading…
Reference in New Issue
Block a user