aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-06-07 16:53:13 -0400
committerjim-p <jimp@pfsense.org>2011-06-07 16:53:13 -0400
commit7bef817c095ef732a2e279c6399e63aeb75f56fe (patch)
treea31c6e44376f59a1b535b5f459c8dc28928d362d /config
parentb2c845aed3f6ce74eed5c8ffa086fe668ba8bf7d (diff)
downloadpfsense-packages-7bef817c095ef732a2e279c6399e63aeb75f56fe.tar.gz
pfsense-packages-7bef817c095ef732a2e279c6399e63aeb75f56fe.tar.bz2
pfsense-packages-7bef817c095ef732a2e279c6399e63aeb75f56fe.zip
Add a box to allow the user to override the default squidguard "Request denied by pfSense proxy". Also don't use pfSense there, but the product name instead.
Diffstat (limited to 'config')
-rw-r--r--config/squidGuard/sgerror.php10
-rw-r--r--config/squidGuard/squidguard_default.xml9
2 files changed, 18 insertions, 1 deletions
diff --git a/config/squidGuard/sgerror.php b/config/squidGuard/sgerror.php
index 8084c5c3..e1e49385 100644
--- a/config/squidGuard/sgerror.php
+++ b/config/squidGuard/sgerror.php
@@ -1,4 +1,6 @@
<?php
+include "globals.inc";
+include "config.inc";
$page_info = <<<EOD
# ----------------------------------------------------------------------------------------------------------------------
# SquidGuard error page generator
@@ -204,13 +206,19 @@ function get_page($body) {
function get_error_page($er_code_id, $err_msg='') {
global $err_code;
global $cl;
+ global $g;
+ global $config;
$str = Array();
header("HTTP/1.1 " . $err_code[$er_code_id]);
$str[] = '<html>';
$str[] = '<body>';
- $str[] = '<h3>Request denied by pfSense proxy: ' . $err_code[$er_code_id] . '</h3>';
+ if ($config['installedpackages']['squidguarddefault']['config'][0]['deniedmessage']) {
+ $str[] = "<h3>{$config['installedpackages']['squidguarddefault']['config'][0]['deniedmessage']}: {$err_code[$er_code_id]}</h3>";
+ } else {
+ $str[] = "<h3>Request denied by {$g['product_name']} proxy: {$err_code[$er_code_id]}</h3>";
+ }
if ($err_msg) $str[] = "<b> Reason: </b> $err_msg";
$str[] = '<hr size="1" noshade>';
if ($cl['a']) $str[] = "<b> Client address: </b> {$cl['a']} <br>";
diff --git a/config/squidGuard/squidguard_default.xml b/config/squidGuard/squidguard_default.xml
index 6fae67c6..ff05085a 100644
--- a/config/squidGuard/squidguard_default.xml
+++ b/config/squidGuard/squidguard_default.xml
@@ -62,6 +62,15 @@
</description>
<type>checkbox</type>
</field>
+ <field>
+ <fielddescr>Proxy Denied Error</fielddescr>
+ <fieldname>deniedmessage</fieldname>
+ <description>The first part of the error message displayed to clients when denied. Defaults to "Request denied by $g['product_name'] proxy"</description>
+ <type>textarea</type>
+ <cols>65</cols>
+ <rows>2</rows>
+ </field>
+
<field>
<fielddescr>Redirect mode</fielddescr>
<fieldname>redirect_mode</fieldname>