fix bug #135: allow single letter 'dns-name', allow to start name with numbers

This commit is contained in:
Dietmar Maurer 2012-04-02 12:08:02 +02:00
parent 74d1b045bd
commit ce33e978f8
3 changed files with 9 additions and 2 deletions

View File

@ -1,7 +1,7 @@
RELEASE=2.0
VERSION=1.0
PKGREL=23
PKGREL=24
PACKAGE=libpve-common-perl

View File

@ -178,7 +178,7 @@ register_format('dns-name', \&pve_verify_dns_name);
sub pve_verify_dns_name {
my ($name, $noerr) = @_;
my $namere = "([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])";
my $namere = "([a-zA-Z0-9]([a-zA-Z0-9\-]*[a-zA-Z0-9])?)";
if ($name !~ /^(${namere}\.)*${namere}$/) {
return undef if $noerr;

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
libpve-common-perl (1.0-24) unstable; urgency=low
* fix bug #135: allow single letter 'dns-name', allow to start names
with numbers
-- Proxmox Support Team <support@proxmox.com> Mon, 02 Apr 2012 12:04:02 +0200
libpve-common-perl (1.0-23) unstable; urgency=low
* moved dir_glob_regex() and dir_glob_foreach() from PVE::Storage