summaryrefslogtreecommitdiffstats
path: root/src/usr
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
parent03ff344816aaaab564c8e9202d1542d5b81323af (diff)
parent51c5313df8b9a9470cad9031b3e93594a4728c9e (diff)
downloadpfsense-3691302fcde7d1efa8ff7866802484d0af1e0ab6.zip
pfsense-3691302fcde7d1efa8ff7866802484d0af1e0ab6.tar.gz
Merge pull request #3083 from doktornotor/patch-2
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/share/locale/en/LC_MESSAGES/pfSense.pot4
-rw-r--r--src/usr/local/www/services_dhcp.php8
-rw-r--r--src/usr/local/www/services_dhcp_edit.php4
3 files changed, 8 insertions, 8 deletions
diff --git a/src/usr/local/share/locale/en/LC_MESSAGES/pfSense.pot b/src/usr/local/share/locale/en/LC_MESSAGES/pfSense.pot
index 7e54d41..15d1d6d 100644
--- a/src/usr/local/share/locale/en/LC_MESSAGES/pfSense.pot
+++ b/src/usr/local/share/locale/en/LC_MESSAGES/pfSense.pot
@@ -19558,7 +19558,7 @@ msgstr ""
#: src/usr/local/www/services_dhcp.php:333
#: src/usr/local/www/services_dhcp_edit.php:285
-msgid "A valid IP address or hostname must be specified for the TFTP server."
+msgid "A valid IP address, hostname or URL must be specified for the TFTP server."
msgstr ""
#: src/usr/local/www/services_dhcp.php:336
@@ -19963,7 +19963,7 @@ msgstr ""
#: src/usr/local/www/services_dhcp.php:1091
msgid ""
-"Leave blank to disable. Enter a full hostname or IP for the TFTP server."
+"Leave blank to disable. Enter a valid IP address, hostname or URL for the TFTP server."
msgstr ""
#: src/usr/local/www/services_dhcp.php:1104
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(
diff --git a/src/usr/local/www/services_dhcp_edit.php b/src/usr/local/www/services_dhcp_edit.php
index 28f9c17..53dd933 100644
--- a/src/usr/local/www/services_dhcp_edit.php
+++ b/src/usr/local/www/services_dhcp_edit.php
@@ -281,8 +281,8 @@ if ($_POST) {
if (($_POST['ntp1'] && !is_ipaddrv4($_POST['ntp1'])) || ($_POST['ntp2'] && !is_ipaddrv4($_POST['ntp2']))) {
$input_errors[] = gettext("A valid IP address must be specified for the primary/secondary NTP servers.");
}
- 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.");
OpenPOWER on IntegriCloud