Allow more characters in TLH definitions.

TLH may now also contain literal dots '.',
allowing for using second or third level
hierarchies as "TLH". To faciliate that,
'+' and '-' will be allowed, too.

Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
Thomas Hochstein 2012-05-27 14:00:14 +02:00
parent 7773fb6d8f
commit 314e31aadf

View file

@ -91,7 +91,7 @@ if ($Conf{'TLH'}) {
$TLH =~ s/(?<!\.)$/./; $TLH =~ s/(?<!\.)$/./;
# check for illegal characters # check for illegal characters
&Bleat(2,'Config error - illegal characters in TLH definition!') &Bleat(2,'Config error - illegal characters in TLH definition!')
if ($TLH !~ /^[a-zA-Z0-9:]+$/); if ($TLH !~ /^[a-zA-Z0-9:+.-]+$/);
# escape dots # escape dots
$TLH =~ s/\./\\./g; $TLH =~ s/\./\\./g;
if ($TLH =~ /:/) { if ($TLH =~ /:/) {