diff options
author | Phil Davis <phil.davis@inf.org> | 2015-01-10 19:25:40 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-01-10 19:25:40 +0545 |
commit | 080b0f223ac12a694efce9d8ba0b1592968caf74 (patch) | |
tree | 7baacdab61b2870fdf97efe780e8db27cae90937 /config | |
parent | 655d11944dbc7b32c31fd8f52a8bdeca281851c4 (diff) | |
download | pfsense-packages-080b0f223ac12a694efce9d8ba0b1592968caf74.tar.gz pfsense-packages-080b0f223ac12a694efce9d8ba0b1592968caf74.tar.bz2 pfsense-packages-080b0f223ac12a694efce9d8ba0b1592968caf74.zip |
OpenVPN export fix index typo
The $server array here has and "index" key, not an "sindex" key.
Actually nothing was broken by this. When the user switches server selections, server_changed() is called. That uses JavaScript and selectedIndex to work out which entry the user selected. selectedIndex is a zero-based number. It matches the zero-based index of servers, which was built from the zero-based indexes of $ras_server array, which was built from data in the config. So by good luck or good management, this array index name typo is not actually a bug.
I noticed it while investigating forum https://forum.pfsense.org/index.php?topic=86263.0
Diffstat (limited to 'config')
-rwxr-xr-x | config/openvpn-client-export/vpn_openvpn_export.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config/openvpn-client-export/vpn_openvpn_export.php b/config/openvpn-client-export/vpn_openvpn_export.php index 12ce01d0..8703d2da 100755 --- a/config/openvpn-client-export/vpn_openvpn_export.php +++ b/config/openvpn-client-export/vpn_openvpn_export.php @@ -601,7 +601,7 @@ function useproxy_changed(obj) { <td width="78%" class="vtable"> <select name="server" id="server" class="formselect" onchange="server_changed()"> <?php foreach($ras_server as & $server): ?> - <option value="<?=$server['sindex'];?>"><?=$server['name'];?></option> + <option value="<?=$server['index'];?>"><?=$server['name'];?></option> <?php endforeach; ?> </select> </td> |