diff options
author | Ermal Luçi <eri@pfsense.org> | 2014-03-19 16:50:01 +0100 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2014-03-19 16:50:01 +0100 |
commit | f3bdba41f7ba86e1f608fdf39cbc9783b63554c5 (patch) | |
tree | d267afb8c07dc44e33ccf84497184c573a9c9369 /usr/local | |
parent | c3e4ef746f64f1804c8d3c036bfc7c35450e370a (diff) | |
parent | 5f242576d3269c1bcfa17ff9fe16600067170dff (diff) | |
download | pfsense-f3bdba41f7ba86e1f608fdf39cbc9783b63554c5.zip pfsense-f3bdba41f7ba86e1f608fdf39cbc9783b63554c5.tar.gz |
Merge pull request #907 from PiBa-NL/openvpn_client_usercredentials
openvpn, allow for entering client user credentials in the WebGUI
Diffstat (limited to 'usr/local')
-rw-r--r-- | usr/local/www/vpn_openvpn_client.php | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/usr/local/www/vpn_openvpn_client.php b/usr/local/www/vpn_openvpn_client.php index ce2cd8e..e040beb 100644 --- a/usr/local/www/vpn_openvpn_client.php +++ b/usr/local/www/vpn_openvpn_client.php @@ -97,10 +97,15 @@ if($_GET['act']=="new"){ $pconfig['digest'] = "SHA1"; } +global $simplefields; +$simplefields = array('auth_user','auth_pass'); + if($_GET['act']=="edit"){ if (isset($id) && $a_client[$id]) { - + foreach($simplefields as $stat) + $pconfig[$stat] = $a_client[$id][$stat]; + $pconfig['disable'] = isset($a_client[$id]['disable']); $pconfig['mode'] = $a_client[$id]['mode']; $pconfig['protocol'] = $a_client[$id]['protocol']; @@ -252,7 +257,10 @@ if ($_POST) { if (!$input_errors) { $client = array(); - + + foreach($simplefields as $stat) + update_if_changed($stat, $client[$stat], $_POST[$stat]); + if ($vpnid) $client['vpnid'] = $vpnid; else @@ -629,6 +637,38 @@ if ($savemsg) <td colspan="2" class="list" height="12"></td> </tr> <tr> + <td colspan="2" valign="top" class="listtopic"><?=gettext("User Authentication Settings"); ?></td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell"><?=gettext("User name/pass"); ?></td> + <td width="78%" class="vtable"> + <?=gettext("Leave empty when no user name and password are needed."); ?> + <br> + <table border="0" cellpadding="2" cellspacing="0"> + <tr> + <td align="right" width="25%"> + <span class="vexpl"> + <?=gettext("Username"); ?> : + </span> + </td> + <td> + <input name="auth_user" id="auth_user" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['auth_user']);?>" /> + </td> + </tr> + <tr> + <td align="right" width="25%"> + <span class="vexpl"> + <?=gettext("Password"); ?> : + </span> + </td> + <td> + <input name="auth_pass" id="auth_pass" type="password" class="formfld pwd" size="20" value="<?=htmlspecialchars($pconfig['auth_pass']);?>" /> + </td> + </tr> + </table> + </td> + </tr> + <tr> <td colspan="2" valign="top" class="listtopic"><?=gettext("Cryptographic Settings"); ?></td> </tr> <tr id="tls"> |