aboutsummaryrefslogtreecommitdiffstats
path: root/config/squid-reverse/squid_reverse.inc
diff options
context:
space:
mode:
authorMarcello Coutinho <marcellocoutinho@gmail.com>2012-04-15 13:29:52 +0000
committerMarcello Coutinho <marcellocoutinho@gmail.com>2012-04-15 13:29:52 +0000
commit5f63099c1a0ee48b71453ec256df6a993f5f7c6b (patch)
tree8d493516bee30c54060e92bd21e5e5b47b2b42ff /config/squid-reverse/squid_reverse.inc
parent0589df7a0fc260cd3e406faafe4932e69c86e8b6 (diff)
downloadpfsense-packages-5f63099c1a0ee48b71453ec256df6a993f5f7c6b.tar.gz
pfsense-packages-5f63099c1a0ee48b71453ec256df6a993f5f7c6b.tar.bz2
pfsense-packages-5f63099c1a0ee48b71453ec256df6a993f5f7c6b.zip
squid3 - include some array checks to prevert erros on squid_reverse.inc
Diffstat (limited to 'config/squid-reverse/squid_reverse.inc')
-rw-r--r--config/squid-reverse/squid_reverse.inc13
1 files changed, 9 insertions, 4 deletions
diff --git a/config/squid-reverse/squid_reverse.inc b/config/squid-reverse/squid_reverse.inc
index c34f74e5..7c0025ba 100644
--- a/config/squid-reverse/squid_reverse.inc
+++ b/config/squid-reverse/squid_reverse.inc
@@ -100,7 +100,8 @@ function squid_resync_reverse() {
$conf .= "cache_peer {$settings['reverse_owa_ip']} parent 443 0 proxy-only no-query originserver login=PASS connection-auth=on ssl sslflags=DONT_VERIFY_PEER front-end-https=on name=OWA_HOST_pfs\n";
$active_peers=array();
- foreach ($reverse_peers as $rp){
+ if (is_array($reverse_peers))
+ foreach ($reverse_peers as $rp){
if ($rp['enable'] =="on" && $rp['name'] !="" && $rp['ip'] !="" && $rp['port'] !=""){
$conf_peer = "#{$rp['description']}\n";
$conf_peer .= "cache_peer {$rp['ip']} parent {$rp['port']} 0 proxy-only no-query originserver login=PASS ";
@@ -139,12 +140,15 @@ function squid_resync_reverse() {
$conf .= "ignore_expect_100 on\n";
}
}
- foreach ($owa_dirs as $owa_dir)
+ if (is_array($owa_dirs))
+ foreach ($owa_dirs as $owa_dir)
$conf .= "acl OWA_URI_pfs url_regex -i ^https://{$settings['reverse_external_fqdn']}/$owa_dir.*$\n";
}
//$conf .= "ssl_unclean_shutdown on";
- foreach ($reverse_maps as $rm){
- if ($rm['enable'] == "on" && $rm['name']!="" && $rm['peers']!="")
+ if (is_array($reverse_maps))
+ foreach ($reverse_maps as $rm){
+ if ($rm['enable'] == "on" && $rm['name']!="" && $rm['peers']!=""){
+ if (is_array($rm['row']))
foreach ($rm['row'] as $uri){
$url_regex=($uri['vhost'] == ''?$settings['reverse_external_fqdn']:$uri['vhost']);
$conf .= "acl {$rm['name']} url_regex -i {$url_regex}/{$uri['uri']}.*$\n";
@@ -156,6 +160,7 @@ function squid_resync_reverse() {
$cache_peer_deny_conf .= "cache_peer_access {$map_peer} deny allsrc\n";
}
}
+ }
}
//ACCESS