Revision 4f163cb8
Added by Jim Pingle almost 14 years ago
usr/local/www/services_dhcp_edit.php | ||
---|---|---|
111 | 111 |
$_POST['mac'] = strtolower(str_replace("-", ":", $_POST['mac'])); |
112 | 112 |
|
113 | 113 |
if ($_POST['hostname']) { |
114 |
preg_match("/^[0-9]/", $_POST['hostname'], $matches); |
|
115 |
if($matches) |
|
116 |
$input_errors[] = gettext("The hostname cannot start with a numeric character according to RFC952"); |
|
117 | 114 |
preg_match("/\-\$/", $_POST['hostname'], $matches); |
118 | 115 |
if($matches) |
119 | 116 |
$input_errors[] = gettext("The hostname cannot end with a hyphen according to RFC952"); |
Also available in: Unified diff
Apparently RFC 1123 overrides RFC 952 and hostnames can start with digits these days.