Project

General

Profile

« Previous | Next » 

Revision 392687e5

Added by Erik Fonnesbeck almost 15 years ago

Fix hyphen validation for host name on Services: DHCP: Edit static mapping page.

View differences:

usr/local/www/services_dhcp_edit.php
114 114
		preg_match("/^[0-9]/", $_POST['hostname'], $matches);
115 115
		if($matches)
116 116
			$input_errors[] = gettext("The hostname cannot start with a numeric character according to RFC952");
117
		preg_match("/.*\-/", $_POST['hostname'], $matches);
117
		preg_match("/\-\$/", $_POST['hostname'], $matches);
118 118
		if($matches)
119 119
			$input_errors[] = gettext("The hostname cannot end with a hyphen according to RFC952");		
120 120
		if (!is_hostname($_POST['hostname'])) {

Also available in: Unified diff