diff options
author | Marcello Coutinho <marcellocoutinho@gmail.com> | 2012-04-15 13:29:52 +0000 |
---|---|---|
committer | Marcello Coutinho <marcellocoutinho@gmail.com> | 2012-04-15 13:29:52 +0000 |
commit | 5f63099c1a0ee48b71453ec256df6a993f5f7c6b (patch) | |
tree | 8d493516bee30c54060e92bd21e5e5b47b2b42ff | |
parent | 0589df7a0fc260cd3e406faafe4932e69c86e8b6 (diff) | |
download | pfsense-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
-rw-r--r-- | config/squid-reverse/squid_reverse.inc | 13 | ||||
-rw-r--r-- | pkg_config.8.xml | 4 | ||||
-rw-r--r-- | pkg_config.8.xml.amd64 | 4 |
3 files changed, 13 insertions, 8 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 diff --git a/pkg_config.8.xml b/pkg_config.8.xml index 1da960e0..366ee297 100644 --- a/pkg_config.8.xml +++ b/pkg_config.8.xml @@ -1007,10 +1007,10 @@ <descr><![CDATA[High performance web proxy cache.<br> It combines squid as a proxy server with it's capabilities of acting as a HTTP / HTTPS reverse proxy.<br> It includes an Exchange-Web-Access (OWA) Assistant.]]></descr> - <pkginfolink>http://forum.pfsense.org/index.php/topic,44735.0.html</pkginfolink> + <pkginfolink>http://forum.pfsense.org/index.php/topic,48347.0.html</pkginfolink> <website>http://www.squid-cache.org/</website> <category>Network</category> - <version>3.1.19 pkg 2.0</version> + <version>3.1.19 pkg 2.0.1</version> <status>RC1</status> <required_version>2.0</required_version> <maintainer>marcellocoutinho@gmail.com fernando@netfilter.com.br seth.mos@dds.nl mfuchs77@googlemail.com jimp@pfsense.org</maintainer> diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index da29d1b1..a7e149e2 100644 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -115,10 +115,10 @@ <descr><![CDATA[High performance web proxy cache.<br> It combines squid as a proxy server with it's capabilities of acting as a HTTP / HTTPS reverse proxy.<br> It includes an Exchange-Web-Access (OWA) Assistant.]]></descr> - <pkginfolink>http://forum.pfsense.org/index.php/topic,44735.0.html</pkginfolink> + <pkginfolink>http://forum.pfsense.org/index.php/topic,48347.0.html</pkginfolink> <website>http://www.squid-cache.org/</website> <category>Network</category> - <version>3.1.19_2</version> + <version>3.1.19 pkg 2.0.1</version> <status>Stable</status> <required_version>2.0</required_version> <maintainer>fernando@netfilter.com.br seth.mos@dds.nl mfuchs77@googlemail.com jimp@pfsense.org</maintainer> |