summaryrefslogtreecommitdiffstats
path: root/usr/local/www/vpn_openvpn_server.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-01-06 07:27:36 +0545
committerPhil Davis <phil.davis@inf.org>2015-01-06 07:27:36 +0545
commit91454850ad2057972b8901d00d5580356b6d543a (patch)
tree3dcb45414f4e8b3ebd864309159292ea4793e06f /usr/local/www/vpn_openvpn_server.php
parent386788e25f6a2144bca8f162795f14a0bc4763e6 (diff)
downloadpfsense-91454850ad2057972b8901d00d5580356b6d543a.zip
pfsense-91454850ad2057972b8901d00d5580356b6d543a.tar.gz
OpenVPN backend authentication fix key and translation
The array returned by auth_get_authserver_list() has key as the fixed name of each available authentication mode - e.g. "Local Database". The array value ["name"] has the name string translated into the selected GUI language. Use the key do determine which items are selected, and as the value that ends up being stored in the config. Use ["name"] for display. Forum report: https://forum.pfsense.org/index.php?topic=86326.0 Redmine Bug #4180
Diffstat (limited to 'usr/local/www/vpn_openvpn_server.php')
-rw-r--r--usr/local/www/vpn_openvpn_server.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/local/www/vpn_openvpn_server.php b/usr/local/www/vpn_openvpn_server.php
index 3c6e228..71686d2 100644
--- a/usr/local/www/vpn_openvpn_server.php
+++ b/usr/local/www/vpn_openvpn_server.php
@@ -801,12 +801,12 @@ if ($savemsg)
<?php $authmodes = explode(",", $pconfig['authmode']); ?>
<?php
$auth_servers = auth_get_authserver_list();
- foreach ($auth_servers as $auth_server):
+ foreach ($auth_servers as $auth_server_key => $auth_server):
$selected = "";
- if (in_array($auth_server['name'], $authmodes))
+ if (in_array($auth_server_key, $authmodes))
$selected = "selected=\"selected\"";
?>
- <option value="<?=$auth_server['name'];?>" <?=$selected;?>><?=$auth_server['name'];?></option>
+ <option value="<?=$auth_server_key;?>" <?=$selected;?>><?=$auth_server['name'];?></option>
<?php endforeach; ?>
</select>
</td>
OpenPOWER on IntegriCloud