From a7f8506c32dae34ad0fd39e7989eb0c8ba25370b Mon Sep 17 00:00:00 2001 From: doktornotor Date: Wed, 14 Oct 2015 16:11:44 +0200 Subject: Put validation to 'Throttle Only Specific Extensions' to avoid an empty ACL --- config/squid3/34/squid.inc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'config/squid3') diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc index cde74ebc..d8598141 100755 --- a/config/squid3/34/squid.inc +++ b/config/squid3/34/squid.inc @@ -974,6 +974,14 @@ function squid_validate_traffic($post, &$input_errors) { $input_errors[] = "'Finish when remaining %' must contain valid percentage (1-100)."; } } + + if ($post['throttle_specific'] == "on") { + $others = trim($post['throttle_others']); + if ($post['throttle_binaries'] == "" && $post['throttle_cdimages'] == "" && $post['throttle_multimedia'] == "" && $others == "") { + $input_errors[] = "'Throttle Only Specific Extensions' enabled but no extensions specified. Select some options under 'Squid Transfer Extension Settings' or disable this option."; + } + } + } /* Proxy Server: Authentication input validation */ -- cgit v1.2.3