summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/system_authservers.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2017-07-10 12:12:55 -0400
committerjim-p <jimp@pfsense.org>2017-07-10 12:12:55 -0400
commit4e4cac0dd53afcf26aa2b523dc16916730d92133 (patch)
treeb32b7a74764aa07e5a9b6128230f487ed40d0a50 /src/usr/local/www/system_authservers.php
parentf49ef559060ec8cad5c7a3a548d509cf08b5549b (diff)
downloadpfsense-4e4cac0dd53afcf26aa2b523dc16916730d92133.zip
pfsense-4e4cac0dd53afcf26aa2b523dc16916730d92133.tar.gz
Improve the way the auth server list is generated and account for a key being removed from the array when deleting. Fixes #7682
Diffstat (limited to 'src/usr/local/www/system_authservers.php')
-rw-r--r--src/usr/local/www/system_authservers.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/usr/local/www/system_authservers.php b/src/usr/local/www/system_authservers.php
index a651dfa..4133e47 100644
--- a/src/usr/local/www/system_authservers.php
+++ b/src/usr/local/www/system_authservers.php
@@ -103,11 +103,8 @@ if (!is_array($config['system']['authserver'])) {
$config['system']['authserver'] = array();
}
-$a_servers = auth_get_authserver_list();
+$a_server = array_values(auth_get_authserver_list());
-foreach ($a_servers as $servers) {
- $a_server[] = $servers;
-}
if (!is_array($config['ca'])) {
$config['ca'] = array();
@@ -134,6 +131,7 @@ if ($_POST['act'] == "del") {
/* Remove server from temp list used later on this page. */
unset($a_server[$_POST['id']]);
+ $a_server = array_values($a_server);
$savemsg = sprintf(gettext("Authentication Server %s deleted."), htmlspecialchars($serverdeleted));
write_config($savemsg);
OpenPOWER on IntegriCloud