From dcb0cfe7d6b632db801bb1e0b2073024fa0a97df Mon Sep 17 00:00:00 2001 From: doktornotor Date: Sat, 7 Nov 2015 13:38:36 +0100 Subject: Add input validation to force disabling of blacklists on nanobsd --- config/squidGuard/squidguard.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/squidGuard/squidguard.inc b/config/squidGuard/squidguard.inc index 4b5b7f43..0747dd0c 100644 --- a/config/squidGuard/squidguard.inc +++ b/config/squidGuard/squidguard.inc @@ -112,6 +112,11 @@ function squidguard_validate(&$post, &$input_errors) 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); } } -- cgit v1.2.3