summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-09-25 11:50:08 -0400
committerjim-p <jimp@pfsense.org>2012-09-25 11:50:08 -0400
commit767cf960f4f7f6f525d971f6247c663590c1637e (patch)
tree848afd50d2119e9930bd2258278ce71ba8c255f0 /usr/local/www
parentf00278f1e8cc2a534f13a6f3510aed85ebe11bd4 (diff)
downloadpfsense-767cf960f4f7f6f525d971f6247c663590c1637e.zip
pfsense-767cf960f4f7f6f525d971f6247c663590c1637e.tar.gz
Refine OpenVPN client/server deletion to allow for removing invalid empty entries. Fixes #2643
Diffstat (limited to 'usr/local/www')
-rw-r--r--usr/local/www/vpn_openvpn_client.php6
-rw-r--r--usr/local/www/vpn_openvpn_server.php6
2 files changed, 6 insertions, 6 deletions
diff --git a/usr/local/www/vpn_openvpn_client.php b/usr/local/www/vpn_openvpn_client.php
index f2002ed..8b269f5 100644
--- a/usr/local/www/vpn_openvpn_client.php
+++ b/usr/local/www/vpn_openvpn_client.php
@@ -75,12 +75,12 @@ else
if ($_GET['act'] == "del") {
- if (!$a_client[$id]) {
+ if (!isset($a_client[$id])) {
pfSenseHeader("vpn_openvpn_client.php");
exit;
}
-
- openvpn_delete('client', $a_client[$id]);
+ if (!empty($a_client[$id]))
+ openvpn_delete('client', $a_client[$id]);
unset($a_client[$id]);
write_config();
$savemsg = gettext("Client successfully deleted")."<br/>";
diff --git a/usr/local/www/vpn_openvpn_server.php b/usr/local/www/vpn_openvpn_server.php
index d098f43..f038271 100644
--- a/usr/local/www/vpn_openvpn_server.php
+++ b/usr/local/www/vpn_openvpn_server.php
@@ -76,12 +76,12 @@ else
if ($_GET['act'] == "del") {
- if (!$a_server[$id]) {
+ if (!isset($a_server[$id])) {
pfSenseHeader("vpn_openvpn_server.php");
exit;
}
-
- openvpn_delete('server', $a_server[$id]);
+ if (!empty($a_server[$id]))
+ openvpn_delete('server', $a_server[$id]);
unset($a_server[$id]);
write_config();
$savemsg = gettext("Server successfully deleted")."<br/>";
OpenPOWER on IntegriCloud