diff options
author | scherma <github@hexistentialist.com> | 2017-01-04 18:58:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-04 18:58:43 +0000 |
commit | a5978b9adc8cac57040a9abedd01f9993567a59a (patch) | |
tree | 3acfedc2c308a3030304a7d19917b30bd7103639 | |
parent | 280f00096435bf7b511d8ab605f5fbc72738d1ec (diff) | |
download | pfsense-a5978b9adc8cac57040a9abedd01f9993567a59a.zip pfsense-a5978b9adc8cac57040a9abedd01f9993567a59a.tar.gz |
Server side validation and description amendment
-rw-r--r-- | src/usr/local/www/system_usermanager_settings.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/usr/local/www/system_usermanager_settings.php b/src/usr/local/www/system_usermanager_settings.php index 865e496..8782818 100644 --- a/src/usr/local/www/system_usermanager_settings.php +++ b/src/usr/local/www/system_usermanager_settings.php @@ -117,6 +117,13 @@ if ($_POST) { $input_errors[] = gettext("Session timeout must be an integer value."); } } + + if (isset($_POST['auth_refresh_time'])) { + $timeout = intval($_POST['auth_refresh_time']); + if ($timeout != "" && (!is_numeric($timeout) || $timeout < 0 || $timeout > 3600 )) { + $input_errors[] = gettext("Authentication refresh time must be an integer between 0 and 3600 (inclusive)."); + } + } if (($_POST['authmode'] == "Local Database") && $_POST['savetest']) { $savemsg = gettext("Settings have been saved, but the test was not performed because it is not supported for local databases."); @@ -212,7 +219,7 @@ $section->addInput(new Form_Input( $pconfig['auth_refresh_time'], ['min' => 0, 'max' => 3600] ))->setHelp('Time in seconds to cache authentication results. The default is 30 seconds, maximum 3600 (one hour). '. - 'Shorter times result in more frequent queries to auth services, and more logs generated.'); + 'Shorter times result in more frequent queries to authentication servers.'); $form->addGlobal(new Form_Button( 'savetest', |