diff options
author | Steve Beaver <sbeaver@netgate.com> | 2017-02-10 13:31:55 -0500 |
---|---|---|
committer | Steve Beaver <sbeaver@netgate.com> | 2017-02-10 13:31:55 -0500 |
commit | bae64f1fade7f58772279539915546703339c4b9 (patch) | |
tree | cd9398814413991223c73dc8068659695b607586 /src/usr/local/www | |
parent | 844503729a7deae400c23ad701d7f65305f43710 (diff) | |
download | pfsense-bae64f1fade7f58772279539915546703339c4b9.zip pfsense-bae64f1fade7f58772279539915546703339c4b9.tar.gz |
GET/POST conversion vpn_openvpn_client
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/vpn_openvpn_client.php | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/usr/local/www/vpn_openvpn_client.php b/src/usr/local/www/vpn_openvpn_client.php index 97389d3..0d863f1 100644 --- a/src/usr/local/www/vpn_openvpn_client.php +++ b/src/usr/local/www/vpn_openvpn_client.php @@ -57,14 +57,11 @@ if (!is_array($config['crl'])) { $a_crl =& $config['crl']; -if (is_numericint($_GET['id'])) { - $id = $_GET['id']; -} if (isset($_POST['id']) && is_numericint($_POST['id'])) { $id = $_POST['id']; } -$act = $_GET['act']; +$act = $_POST['act']; if (isset($_POST['act'])) { $act = $_POST['act']; } @@ -75,7 +72,7 @@ if (isset($id) && $a_client[$id]) { $vpnid = 0; } -if ($_GET['act'] == "del") { +if ($_POST['act'] == "del") { if (!isset($a_client[$id])) { pfSenseHeader("vpn_openvpn_client.php"); @@ -89,7 +86,7 @@ if ($_GET['act'] == "del") { $savemsg = gettext("Client successfully deleted."); } -if ($_GET['act'] == "new") { +if ($_POST['act'] == "new") { $pconfig['ncp_enable'] = "enabled"; $pconfig['ncp-ciphers'] = "AES-256-GCM,AES-128-GCM"; $pconfig['autokey_enable'] = "yes"; @@ -105,7 +102,7 @@ if ($_GET['act'] == "new") { global $simplefields; $simplefields = array('auth_user', 'auth_pass'); -if ($_GET['act'] == "edit") { +if ($_POST['act'] == "edit") { if (isset($id) && $a_client[$id]) { foreach ($simplefields as $stat) { @@ -182,7 +179,7 @@ if ($_GET['act'] == "edit") { } } -if ($_POST) { +if ($_POST['save']) { unset($input_errors); $pconfig = $_POST; @@ -926,8 +923,8 @@ else: <?=htmlspecialchars($client['description'])?> </td> <td> - <a class="fa fa-pencil" title="<?=gettext('Edit client')?>" href="vpn_openvpn_client.php?act=edit&id=<?=$i?>"></a> - <a class="fa fa-trash" title="<?=gettext('Delete client')?>" href="vpn_openvpn_client.php?act=del&id=<?=$i?>"></a> + <a class="fa fa-pencil" title="<?=gettext('Edit client')?>" href="vpn_openvpn_client.php?act=edit&id=<?=$i?>" usepost></a> + <a class="fa fa-trash" title="<?=gettext('Delete client')?>" href="vpn_openvpn_client.php?act=del&id=<?=$i?>" usepost></a> </td> </tr> <?php @@ -940,7 +937,7 @@ else: </div> <nav class="action-buttons"> - <a href="vpn_openvpn_client.php?act=new" class="btn btn-sm btn-success"> + <a href="vpn_openvpn_client.php?act=new" class="btn btn-sm btn-success" usepost> <i class="fa fa-plus icon-embed-btn"></i> <?=gettext("Add")?> </a> |