From 2df7210ac6afa2553db919e3aefcb706077fa31c Mon Sep 17 00:00:00 2001 From: doktornotor Date: Fri, 25 Sep 2015 09:42:45 +0200 Subject: Fix quick_abort_min input validation to conform to Squid documentation -1 is a legal value here, meaning always finish the retrieval. --- config/squid3/34/squid.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc index 4905f96c..33836d9e 100755 --- a/config/squid3/34/squid.inc +++ b/config/squid3/34/squid.inc @@ -675,8 +675,8 @@ function squid_validate_traffic($post, &$input_errors) { if (!empty($post['quick_abort_min'])) { $value = trim($post['quick_abort_min']); - if (!is_numericint($value)) { - $input_errors[] = "'Finish when remaining KB' must contain a positive integer."; + if ((!is_numericint($value)) && ($value !== -1)) { + $input_errors[] = "'Finish when remaining KB' must contain a positive integer or '-1'."; } } -- cgit v1.2.3