From 832cd12f23391e01e197dcf341c75c2fbcf04e41 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Mon, 1 Feb 2016 11:50:10 +0100 Subject: [PATCH] (legacy) system_authservers.php, empty server name not allowed. closes https://github.com/opnsense/core/issues/731 --- src/www/system_authservers.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/www/system_authservers.php b/src/www/system_authservers.php index f6985ae5a..5bc97b1a3 100644 --- a/src/www/system_authservers.php +++ b/src/www/system_authservers.php @@ -179,6 +179,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { if (($pconfig['type'] == "radius") && isset($pconfig['radius_timeout']) && !empty($pconfig['radius_timeout']) && (!is_numeric($pconfig['radius_timeout']) || (is_numeric($pconfig['radius_timeout']) && ($pconfig['radius_timeout'] <= 0)))) { $input_errors[] = gettext("RADIUS Timeout value must be numeric and positive."); } + if (empty($pconfig['name'])) { + $input_errors[] = gettext("A server name must be provided"); + } + if (count($input_errors) == 0) { $server = array(); $server['refid'] = uniqid(); @@ -442,11 +446,13 @@ endif; ?> - $typedesc) : ?> - +