aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-11-12 16:24:06 -0500
committerjim-p <jimp@pfsense.org>2013-11-12 16:24:06 -0500
commitdc36992067d3aa78702c493b47baa2c58f98f7fd (patch)
tree307d4cc23ff4cbb3b02915e5f5d74552585230be /config
parent333d9e83cf67dbbf46b4f8cbdf67f557b8be98a8 (diff)
downloadpfsense-packages-dc36992067d3aa78702c493b47baa2c58f98f7fd.tar.gz
pfsense-packages-dc36992067d3aa78702c493b47baa2c58f98f7fd.tar.bz2
pfsense-packages-dc36992067d3aa78702c493b47baa2c58f98f7fd.zip
Fix input validation so it does not incorrectly state that a valid config ending in a ; is invalid.
Diffstat (limited to 'config')
-rw-r--r--config/squid/squid.inc13
1 files changed, 7 insertions, 6 deletions
diff --git a/config/squid/squid.inc b/config/squid/squid.inc
index 34186407..e136d9f8 100644
--- a/config/squid/squid.inc
+++ b/config/squid/squid.inc
@@ -447,12 +447,13 @@ function squid_validate_nac($post, $input_errors) {
$input_errors[] = "The time range '$time' is not a valid time range";
}
- if(!empty($post['ext_cachemanager'])) {
- $extmgr = explode(";", ($post['ext_cachemanager']));
- foreach ($extmgr as $mgr) {
- if (!is_ipaddr($mgr))
- $input_errors[] = 'You must enter a valid IP address in the \'External Cache Manager\' field';
- }}
+ if(!empty($post['ext_cachemanager'])) {
+ $extmgr = explode(";", ($post['ext_cachemanager']));
+ foreach ($extmgr as $mgr) {
+ if (!empty($mgr) && !is_ipaddr($mgr))
+ $input_errors[] = 'You must enter a valid IP address in the \'External Cache Manager\' field';
+ }
+ }
}
function squid_validate_traffic($post, $input_errors) {