Project

General

Profile

« Previous | Next » 

Revision 8a85ab90

Added by Jim Pingle almost 14 years ago

Apparently RFC 1123 overrides RFC 952 and hostnames can start with digits these days.

View differences:

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");		
usr/local/www/services_dhcpv6_edit.php
108 108
	do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
109 109

  
110 110
	if ($_POST['hostname']) {
111
		preg_match("/^[0-9]/", $_POST['hostname'], $matches);
112
		if($matches)
113
			$input_errors[] = gettext("The hostname cannot start with a numeric character according to RFC952");
114 111
		preg_match("/\-\$/", $_POST['hostname'], $matches);
115 112
		if($matches)
116 113
			$input_errors[] = gettext("The hostname cannot end with a hyphen according to RFC952");		

Also available in: Unified diff