aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/squidGuard-devel/squidguard.inc14
1 files changed, 13 insertions, 1 deletions
diff --git a/config/squidGuard-devel/squidguard.inc b/config/squidGuard-devel/squidguard.inc
index 0be94a6f..fe19fa8d 100644
--- a/config/squidGuard-devel/squidguard.inc
+++ b/config/squidGuard-devel/squidguard.inc
@@ -103,10 +103,22 @@ sg_init(convert_pfxml_to_sgxml());
# ==============================================================================
function squidguard_validate($post, &$input_errors)
{
+ global $config, $g;
$submit = isset($_GET['submit']) ? $_GET['submit'] : $_POST['submit'];
# check config if 'Apply'
- if ($submit === APPLY_BTN) sg_check_config_data($input_errors);
+ if ($submit === APPLY_BTN) {
+ // XXX:Bug #4608
+ if (($g['platform'] == "pfSense") && isset($config['system']['use_mfs_tmpvar'])) {
+ $input_errors[] = "Please, disable 'Use RAM Disks' under System: Advanced: Miscellaneous to avoid SquidGuard configuration breakage on reboot.";
+ }
+ if ($g['platform'] != "pfSense") {
+ if ($post['blacklist'] != "" || $post['blacklist_proxy'] != "" || $post['blacklist_url'] != "") {
+ $input_errors[] = "Blacklists usage is NOT supported on NanoBSD. Disable 'Blacklist' option in 'General settings'.";
+ }
+ }
+ sg_check_config_data($input_errors);
+ }
}
# ------------------------------------------------------------------------------