diff options
author | doktornotor <notordoktor@gmail.com> | 2016-07-31 10:21:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-31 10:21:57 +0200 |
commit | 483816313924f87707bca0aa983c73064bd52371 (patch) | |
tree | 3a4b29487be75845d528b54ed2daee4b2a6675ff | |
parent | bfbfa4dd254c110db4122925d0a3716a34d4c664 (diff) | |
download | pfsense-483816313924f87707bca0aa983c73064bd52371.zip pfsense-483816313924f87707bca0aa983c73064bd52371.tar.gz |
Allow URLs for TFTP Server (Bug #6634)
is_URL() from util.inc is way too limited for this purpose.
-rw-r--r-- | src/usr/local/www/services_dhcp.php | 4 |
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 f04b824..74d9746 100644 --- a/src/usr/local/www/services_dhcp.php +++ b/src/usr/local/www/services_dhcp.php @@ -329,8 +329,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."); |