summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/services_dhcp.php
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2016-07-31 10:21:57 +0200
committerRenato Botelho <renato@netgate.com>2016-08-04 18:47:09 -0300
commit2e5a481c91eddcc4fbdff189eee4a0afe9cfaa63 (patch)
treefead7f510515fddd26e11138c7d522dc6598fbff /src/usr/local/www/services_dhcp.php
parent2d8770b2ce08c5ec0b75c62bc8acb9cdd12f1ad1 (diff)
downloadpfsense-2e5a481c91eddcc4fbdff189eee4a0afe9cfaa63.zip
pfsense-2e5a481c91eddcc4fbdff189eee4a0afe9cfaa63.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 483816313924f87707bca0aa983c73064bd52371)
Diffstat (limited to 'src/usr/local/www/services_dhcp.php')
-rw-r--r--src/usr/local/www/services_dhcp.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php
index ba2afff..4d7d120 100644
--- a/src/usr/local/www/services_dhcp.php
+++ b/src/usr/local/www/services_dhcp.php
@@ -362,8 +362,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.");
+ f ($_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