Project

General

Profile

« Previous | Next » 

Revision 407f6220

Added by Chris Buechler over 15 years ago

clarify what is valid for input errors on hostname

View differences:

usr/local/www/load_balancer_monitor_edit.php
106 106
			if (is_array($pconfig['options'])) {
107 107
				if (isset($pconfig['options']['host']) && $pconfig['options']['host'] != "") {
108 108
					if (!is_hostname($pconfig['options']['host'])) {
109
						$input_errors[] = "Invalid hostname.";
109
						$input_errors[] = "The hostname can only contain the characters A-Z, 0-9 and '-'.";
110 110
					}
111 111
				}
112 112
				if (isset($pconfig['options']['code']) && $pconfig['options']['code'] != "") {
usr/local/www/services_dhcp_edit.php
111 111
	
112 112
	if ($_POST['hostname']) {
113 113
		if (!is_hostname($_POST['hostname'])) {
114
			$input_errors[] = "A valid host name must be specified.";
114
			$input_errors[] = "The hostname can only contain the characters A-Z, 0-9 and '-'.";
115 115
		} else {
116 116
			if (strpos($_POST['hostname'],'.')) {
117 117
				$input_errors[] = "A valid hostname is specified, but the domain name part should be omitted";
usr/local/www/services_dnsmasq_edit.php
83 83
	do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
84 84
	
85 85
	if (($_POST['host'] && !is_hostname($_POST['host']))) 
86
		$input_errors[] = "A valid host must be specified.";
86
		$input_errors[] = "The hostname can only contain the characters A-Z, 0-9 and '-'.";
87 87

  
88 88
	if (($_POST['domain'] && !is_domain($_POST['domain']))) 
89 89
		$input_errors[] = "A valid domain must be specified.";

Also available in: Unified diff