fixed hostname regex

This commit is contained in:
2016-02-22 09:22:56 -05:00
parent 1a0768b779
commit 5c54c53911
3 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ my $host = shift || die "No vhost provided";
my $master = shift || die "No master DNS IP provided";
die "Hostname must end in a dot"
unless ($host =~ /^[a-zA-Z0-9\.]+\.$/);
unless ($host =~ /^[a-zA-Z0-9\.\-\_]+\.$/);
my $regex = $RE{net}{IPv4} . '|' . $RE{net}{IPv6};
die "Master must be an IPv4 or IPv6 address"

View File

@ -8,7 +8,7 @@ use Regexp::Common qw/net/;
my $host = shift || die "No vhost provided";
die "Hostname must end in a dot"
unless ($host =~ /^[a-zA-Z0-9\.]+\.$/);
unless ($host =~ /^[a-zA-Z0-9\-\_\.]+\.$/);
my $ddns = Martnet::DDNS->new();
$ddns->delvhost($host);