summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/services_dhcp.php
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-08-04 18:46:29 -0300
committerRenato Botelho <renato@netgate.com>2016-08-04 18:46:29 -0300
commit3691302fcde7d1efa8ff7866802484d0af1e0ab6 (patch)
tree9b480ccc4e51bad2d6b154ff5f0643f98f081a2c /src/usr/local/www/services_dhcp.php
parent03ff344816aaaab564c8e9202d1542d5b81323af (diff)
parent51c5313df8b9a9470cad9031b3e93594a4728c9e (diff)
downloadpfsense-3691302fcde7d1efa8ff7866802484d0af1e0ab6.zip
pfsense-3691302fcde7d1efa8ff7866802484d0af1e0ab6.tar.gz
Merge pull request #3083 from doktornotor/patch-2
Diffstat (limited to 'src/usr/local/www/services_dhcp.php')
-rw-r--r--src/usr/local/www/services_dhcp.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php
index d16159d..a9451b0 100644
--- a/src/usr/local/www/services_dhcp.php
+++ b/src/usr/local/www/services_dhcp.php
@@ -330,8 +330,8 @@ if (isset($_POST['save'])) {
if (($_POST['domain'] && !is_domain($_POST['domain']))) {
$input_errors[] = gettext("A valid domain name must be specified for the DNS domain.");
}
- if ($_POST['tftp'] && !is_ipaddrv4($_POST['tftp']) && !is_domain($_POST['tftp']) && !is_URL($_POST['tftp'])) {
- $input_errors[] = gettext("A valid IP address or hostname must be specified for the TFTP server.");
+ if ($_POST['tftp'] && !is_ipaddrv4($_POST['tftp']) && !is_domain($_POST['tftp']) && !filter_var($_POST['tftp'], FILTER_VALIDATE_URL)) {
+ $input_errors[] = gettext("A valid IP address, hostname or URL must be specified for the TFTP server.");
}
if (($_POST['nextserver'] && !is_ipaddrv4($_POST['nextserver']))) {
$input_errors[] = gettext("A valid IP address must be specified for the network boot server.");
@@ -1093,11 +1093,11 @@ $section->addInput(new Form_StaticText(
$btnadv
));
-$section->addInput(new Form_IpAddress(
+$section->addInput(new Form_Input(
'tftp',
'TFTP Server',
$pconfig['tftp']
-))->setHelp('Leave blank to disable. Enter a full hostname or IP for the TFTP server.')->setPattern('[.a-zA-Z0-9_-]+');
+))->setHelp('Leave blank to disable. Enter a valid IP address, hostname or URL for the TFTP server.');
// Advanced LDAP
$btnadv = new Form_Button(
OpenPOWER on IntegriCloud