mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
Forbid remapping of *
It might be nice to support this someday, but for now it would fail with an infinite remap cycle. (If I say "remap * *.foo.exit", then example.com -> example.com.foo.exit -> example.com.foo.exit.foo.exit -> example.com.foo.exit.foo.exit.foo.exit -> ...)
This commit is contained in:
parent
69d16900aa
commit
ff3eb8e023
@ -4477,6 +4477,11 @@ config_register_addressmaps(const or_options_t *options)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!strcmp(to, "*") || !strcmp(from, "*")) {
|
||||
log_warn(LD_CONFIG,"MapAddress '%s' is unsupported - can't remap from "
|
||||
"or to *. Ignoring.",opt->value);
|
||||
goto cleanup;
|
||||
}
|
||||
/* Detect asterisks in expressions of type: '*.example.com' */
|
||||
if (!strncmp(from,"*.",2)) {
|
||||
from += 2;
|
||||
|
Loading…
Reference in New Issue
Block a user