diff options
-rwxr-xr-x | config/openvpn-client-export/openvpn-client-export.inc | 12 | ||||
-rw-r--r-- | pkg_config.8.xml | 2 | ||||
-rw-r--r-- | pkg_config.8.xml.amd64 | 2 |
3 files changed, 10 insertions, 6 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc index d88d988f..b2c240ec 100755 --- a/config/openvpn-client-export/openvpn-client-export.inc +++ b/config/openvpn-client-export/openvpn-client-export.inc @@ -343,7 +343,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $quotese case "zip": // create template directory $tempdir = "{$g['tmp_path']}/{$prefix}"; - mkdir($tempdir, 0700, true); + @mkdir($tempdir, 0700, true); file_put_contents("{$tempdir}/{$prefix}.ovpn", $conf); @@ -368,10 +368,14 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $quotese else openvpn_client_pem_to_pk12($p12file, $outpass, $crtfile, $keyfile, $cafile); } - exec("cd {$tempdir}/.. && /usr/local/bin/zip -r {$g['tmp_path']}/{$prefix}-config.zip {$prefix}"); + $command = "cd " . escapeshellarg("{$tempdir}/..") + . " && /usr/local/bin/zip -r " + . escapeshellarg("{$g['tmp_path']}/{$prefix}-config.zip") + . " " . escapeshellarg($prefix); + exec($command); // Remove temporary directory - exec("rm -rf {$tempdir}"); - return $g['tmp_path'] . "/{$prefix}-config.zip"; + exec("rm -rf " . escapeshellarg($tempdir)); + return "{$g['tmp_path']}/{$prefix}-config.zip"; break; case "inline": case "inlinedroid": diff --git a/pkg_config.8.xml b/pkg_config.8.xml index 1c2c1068..ac814fc5 100644 --- a/pkg_config.8.xml +++ b/pkg_config.8.xml @@ -1435,7 +1435,7 @@ <depends_on_package_pbi>zip-3.0-i386.pbi p7zip-9.20.1-i386.pbi</depends_on_package_pbi> <build_port_path>/usr/ports/archivers/p7zip</build_port_path> <build_port_path>/usr/ports/archivers/zip</build_port_path> - <version>1.0.8</version> + <version>1.0.9</version> <status>RELEASE</status> <required_version>2.0</required_version> <config_file>http://www.pfsense.com/packages/config/openvpn-client-export/openvpn-client-export.xml</config_file> diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index 9f178416..670a25b5 100644 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -1422,7 +1422,7 @@ <depends_on_package_pbi>p7zip-9.20.1-amd64.pbi zip-3.0-amd64.pbi</depends_on_package_pbi> <build_port_path>/usr/ports/archivers/p7zip</build_port_path> <build_port_path>/usr/ports/archivers/zip</build_port_path> - <version>1.0.8</version> + <version>1.0.9</version> <status>RELEASE</status> <required_version>2.0</required_version> <config_file>http://www.pfsense.com/packages/config/openvpn-client-export/openvpn-client-export.xml</config_file> |