diff options
author | doktornotor <notordoktor@gmail.com> | 2016-07-31 10:38:32 +0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-08-04 18:48:05 -0300 |
commit | 8b125927d25260d5f8b724057aed869815578d95 (patch) | |
tree | 02ebaba254cb010269bf7c9e79610422b4fe2d63 /src | |
parent | b6843da761b644f6b4cc39acd565754295a7eb0e (diff) | |
download | pfsense-8b125927d25260d5f8b724057aed869815578d95.zip pfsense-8b125927d25260d5f8b724057aed869815578d95.tar.gz |
Allow URLs for TFTP Server (Bug #6634)
is_URL() from util.inc is way too limited for this purpose.
(cherry picked from commit 8ff248d6a3f31dba42c4c64b5290928030faad4a)
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/local/www/services_dhcp_edit.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr/local/www/services_dhcp_edit.php b/src/usr/local/www/services_dhcp_edit.php index f761ce0..7cddcdd 100644 --- a/src/usr/local/www/services_dhcp_edit.php +++ b/src/usr/local/www/services_dhcp_edit.php @@ -313,8 +313,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."); |