Thread hostname checking (11 answers)
Opened by esskar at 2004-08-04 02:30

esskar
 2004-08-15 22:10
#85362 #85362
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
[quote=betterworld,15.08.2004, 14:21][quote=esskar,11.08.2004, 03:04]
Code: (dl )
$valid = 0 if $parts[-1] =~ qr!^\d.*!;
[/quote]
Ich las soeben http://cr.yp.to/djbdns/dot-local.html und mir fiel auf, dass Deine Bedingung fuer Hostnamen nicht mehr erfuellt ist, wenn man den Vorschlaegen in diesem Dokument folgt.[/quote]
hatte mich an den hinweis rfc1738 gehalten

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
host
The fully qualified domain name of a network host, or its IP
address as a set of four decimal digit groups separated by
".". Fully qualified domain names take the form as described
in Section 3.5 of RFC 1034 [13] and Section 2.1 of RFC 1123
[5]: a sequence of domain labels separated by ".", each domain
label starting and ending with an alphanumerical character and
possibly also containing "-" characters. The rightmost domain
label will never start with a digit, though, which
syntactically distinguishes all domain names from the IP
addresses.

View full thread hostname checking