aboutsummaryrefslogtreecommitdiffstats
path: root/config/squidGuard
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-10-18 14:10:45 -0400
committerjim-p <jimp@pfsense.org>2010-10-18 14:22:47 -0400
commit76c3422f13661cbb37e66e297c27efc6b5a6c569 (patch)
tree6816974ea70882ac8c340776e44b7dac7b8d8bfd /config/squidGuard
parentc11e08971fa6d1844670f75216fc8339eee73ee6 (diff)
downloadpfsense-packages-76c3422f13661cbb37e66e297c27efc6b5a6c569.tar.gz
pfsense-packages-76c3422f13661cbb37e66e297c27efc6b5a6c569.tar.bz2
pfsense-packages-76c3422f13661cbb37e66e297c27efc6b5a6c569.zip
Patch from vcoque to restrict squidguard redirect for errors to http only.
Diffstat (limited to 'config/squidGuard')
-rw-r--r--config/squidGuard/squidguard.inc7
-rw-r--r--config/squidGuard/squidguard_configurator.inc3
2 files changed, 4 insertions, 6 deletions
diff --git a/config/squidGuard/squidguard.inc b/config/squidGuard/squidguard.inc
index 303f53b0..f5df409a 100644
--- a/config/squidGuard/squidguard.inc
+++ b/config/squidGuard/squidguard.inc
@@ -1074,21 +1074,20 @@ function convert_pfxml_to_sgxml() {
# other
$sgxml['view_gui_log'] = $pfxml['view_gui_log'];
+ $lanip = $config['interfaces']['lan']['ipaddr'];
+ $sgxml[F_CURRENT_LAN_IP] = $lanip;
# transparent
$squidxml = $config['installedpackages']['squid']['config'][0];
- if(isset($squidxml['transparent_proxy'])) {
- $lanip = $config['interfaces']['lan']['ipaddr'];
+ if($squidxml['transparent_proxy'] == 'on') {
$guiport = $config['system']['webgui']['port'];
$guiprotocol = $config['system']['webgui']['protocol'];
$sgxml[F_SQUID_TRANSPARENT_MODE] = 'on';
- $sgxml[F_CURRENT_LAN_IP] = $lanip;
$sgxml[F_CURRENT_GUI_PORT] = $guiport;
$sgxml[F_CURRENT_GUI_PROTO] = $guiprotocol;
} else {
unset($sgxml[F_SQUID_TRANSPARENT_MODE]);
- unset($sgxml[F_CURRENT_LAN_IP]);
unset($sgxml[F_CURRENT_GUI_PORT]);
unset($sgxml[F_CURRENT_GUI_PROTO]);
}
diff --git a/config/squidGuard/squidguard_configurator.inc b/config/squidGuard/squidguard_configurator.inc
index afc6d23a..f008ef2e 100644
--- a/config/squidGuard/squidguard_configurator.inc
+++ b/config/squidGuard/squidguard_configurator.inc
@@ -1069,8 +1069,7 @@ function sg_redirector_base_url($rdr_info, $redirect_mode)
# gui port, ip & proto
$guiip = (!empty($squidguard_config[F_CURRENT_LAN_IP])) ? $squidguard_config[F_CURRENT_LAN_IP] : '127.0.0.1';
$guiport = (!empty($squidguard_config[F_CURRENT_GUI_PORT])) ? $squidguard_config[F_CURRENT_GUI_PORT] : '80';
- $guiproto = ($squidguard_config[F_CURRENT_GUI_PROTO] === "https") ? "https" : "http";
- $rdr_path = "$guiproto://$guiip:$guiport" . REDIRECT_BASE_URL;
+ $rdr_path = "http://$guiip:$guiport" . REDIRECT_BASE_URL;
# check redirect
$errmsg = '';