From b959a4955ea90f865ff54cce2dd8fea29943a13c Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Mon, 23 Nov 2015 08:35:41 -0200 Subject: Tunable value can be zero, use isset() to validate it --- src/usr/local/www/system_advanced_sysctl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/usr/local/www/system_advanced_sysctl.php') diff --git a/src/usr/local/www/system_advanced_sysctl.php b/src/usr/local/www/system_advanced_sysctl.php index 8e44eed..f0fd2ea 100644 --- a/src/usr/local/www/system_advanced_sysctl.php +++ b/src/usr/local/www/system_advanced_sysctl.php @@ -143,7 +143,7 @@ if ($_POST) { $tunableent = array(); - if(!$_POST['tunable'] || !$_POST['value']) { + if(!$_POST['tunable'] || !isset($_POST['value'])) { $input_errors[] = gettext("Both a name and a value must be specified."); } else if (!ctype_alnum($_POST['value'])) { $input_errors[] = gettext("The value may contain alphanumeric characters only."); -- cgit v1.1