summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-10-22 10:51:28 -0400
committerjim-p <jimp@pfsense.org>2013-10-22 10:53:24 -0400
commitaad5eef2ab645d5da68d17b39daf7a33783eb8a7 (patch)
treebee8c6bdc08e30240479466492330717d67f59c1 /usr
parentf144493c68d718cd8b35b1663170a3dc6c2c85ac (diff)
downloadpfsense-aad5eef2ab645d5da68d17b39daf7a33783eb8a7.zip
pfsense-aad5eef2ab645d5da68d17b39daf7a33783eb8a7.tar.gz
Make the RADIUS settings respect the description of the timeout field. If the timeout value is left blank, use 5 seconds, don't print an error.
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/system_authservers.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/local/www/system_authservers.php b/usr/local/www/system_authservers.php
index 2984d8c..66b188e 100644
--- a/usr/local/www/system_authservers.php
+++ b/usr/local/www/system_authservers.php
@@ -215,7 +215,7 @@ if ($_POST) {
if (auth_get_authserver($pconfig['name']) && !isset($id))
$input_errors[] = gettext("An authentication server with the same name already exists.");
- if (($pconfig['type'] == "radius") && isset($_POST['radius_timeout']) && (!is_numeric($_POST['radius_timeout']) || (is_numeric($_POST['radius_timeout']) && ($_POST['radius_timeout'] <= 0))))
+ if (($pconfig['type'] == "radius") && isset($_POST['radius_timeout']) && !empty($_POST['radius_timeout']) && (!is_numeric($_POST['radius_timeout']) || (is_numeric($_POST['radius_timeout']) && ($_POST['radius_timeout'] <= 0))))
$input_errors[] = gettext("RADIUS Timeout value must be numeric and positive.");
/* if this is an AJAX caller then handle via JSON */
@@ -277,6 +277,8 @@ if ($_POST) {
if ($pconfig['radius_timeout'])
$server['radius_timeout'] = $pconfig['radius_timeout'];
+ else
+ $server['radius_timeout'] = 5;
if ($pconfig['radius_srvcs'] == "both") {
$server['radius_auth_port'] = $pconfig['radius_auth_port'];
OpenPOWER on IntegriCloud