mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
clarify what is valid for input errors on hostname
This commit is contained in:
parent
d539e0e813
commit
407f6220fe
@ -106,7 +106,7 @@ if ($_POST) {
|
||||
if (is_array($pconfig['options'])) {
|
||||
if (isset($pconfig['options']['host']) && $pconfig['options']['host'] != "") {
|
||||
if (!is_hostname($pconfig['options']['host'])) {
|
||||
$input_errors[] = "Invalid hostname.";
|
||||
$input_errors[] = "The hostname can only contain the characters A-Z, 0-9 and '-'.";
|
||||
}
|
||||
}
|
||||
if (isset($pconfig['options']['code']) && $pconfig['options']['code'] != "") {
|
||||
|
||||
@ -111,7 +111,7 @@ if ($_POST) {
|
||||
|
||||
if ($_POST['hostname']) {
|
||||
if (!is_hostname($_POST['hostname'])) {
|
||||
$input_errors[] = "A valid host name must be specified.";
|
||||
$input_errors[] = "The hostname can only contain the characters A-Z, 0-9 and '-'.";
|
||||
} else {
|
||||
if (strpos($_POST['hostname'],'.')) {
|
||||
$input_errors[] = "A valid hostname is specified, but the domain name part should be omitted";
|
||||
|
||||
@ -83,7 +83,7 @@ if ($_POST) {
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
|
||||
|
||||
if (($_POST['host'] && !is_hostname($_POST['host'])))
|
||||
$input_errors[] = "A valid host must be specified.";
|
||||
$input_errors[] = "The hostname can only contain the characters A-Z, 0-9 and '-'.";
|
||||
|
||||
if (($_POST['domain'] && !is_domain($_POST['domain'])))
|
||||
$input_errors[] = "A valid domain must be specified.";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user