diff --git a/OpenVPNConnect/api/module.php b/OpenVPNConnect/api/module.php index f114e82..2511949 100644 --- a/OpenVPNConnect/api/module.php +++ b/OpenVPNConnect/api/module.php @@ -27,7 +27,7 @@ class OpenVPNConnect extends Module{ $this->initializeModule(); break; case 'handleDependencies': - $this->handleDependencies(); + $this->handleDependencies(false); break; case 'handleDependenciesSDCard': $this->handleDependenciesSDCard(); @@ -103,7 +103,6 @@ class OpenVPNConnect extends Module{ // Handles dependency installation and removal private function handleDependencies($sd){ - if($this->checkDependency('openvpn')){ $this->execBackground('opkg remove openvpn-openssl'); @@ -158,7 +157,7 @@ class OpenVPNConnect extends Module{ $open_vpn_cmd = "openvpn --log /pineapple/modules/OpenVPNConnect/log/vpn.log --status /pineapple/modules/OpenVPNConnect/log/status.log --config "; if($inputData[0] != ''){ - $config_name = $inputData[0]; + $config_name = escapeshellcmd($inputData[0]); $open_vpn_cmd .= "/root/vpn_config/" . $config_name . " "; }else{ $this->response = array("success" => false, @@ -189,7 +188,7 @@ class OpenVPNConnect extends Module{ if($inputData[3] != ''){ - $openvpn_flags = $inputData[3]; + $openvpn_flags = escapeshellcmd($inputData[3]); $open_vpn_cmd .= $openvpn_flags; } diff --git a/OpenVPNConnect/js/module.js b/OpenVPNConnect/js/module.js index 3201417..8eb93e2 100644 --- a/OpenVPNConnect/js/module.js +++ b/OpenVPNConnect/js/module.js @@ -43,7 +43,7 @@ registerController('openVPNConnectController', ['$api', '$scope', '$timeout', '$ $timeout(function() {$window.location.reload();}, 5000); } - //console.log(response) //Log the response to the console, this is useful for debugging. + //console.log(response) //Log the response to the console, this is useful for debugging. }); } @@ -266,4 +266,4 @@ registerController('openVPNConnectController', ['$api', '$scope', '$timeout', '$ }; -}]); \ No newline at end of file +}]); diff --git a/OpenVPNConnect/module.html b/OpenVPNConnect/module.html index d43b031..7d4412d 100644 --- a/OpenVPNConnect/module.html +++ b/OpenVPNConnect/module.html @@ -141,15 +141,23 @@
-
- \ No newline at end of file + diff --git a/OpenVPNConnect/module.info b/OpenVPNConnect/module.info index cdbf1a8..d184b17 100644 --- a/OpenVPNConnect/module.info +++ b/OpenVPNConnect/module.info @@ -6,5 +6,5 @@ "tetra" ], "title": "OpenVPNConnect", - "version": "1.2" + "version": "1.3" }