diff options
author | Björn Schießle <schiessle@owncloud.com> | 2012-09-27 01:08:40 +0400 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2012-09-27 01:08:40 +0400 |
commit | 21c6cc45e610f47f7bb7a77132a8f2effd5a83f9 (patch) | |
tree | da51d7905cbd01d08a2b08803dcdf7f40342a25e | |
parent | 9ab887fed543a22f8a57e3322eb4ff23834e2f86 (diff) |
take '\' on windows systems into account to prevent file deletion above upload direectory
-rw-r--r-- | apps/files_external/ajax/removeRootCertificate.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_external/ajax/removeRootCertificate.php b/apps/files_external/ajax/removeRootCertificate.php index f87d4a56308..8c196eddf55 100644 --- a/apps/files_external/ajax/removeRootCertificate.php +++ b/apps/files_external/ajax/removeRootCertificate.php @@ -5,7 +5,7 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); $view = \OCP\Files::getStorage("files_external"); -$cert = ltrim($_POST['cert'], "/."); +$cert = ltrim($_POST['cert'], "/\\."); $file = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'.$cert; unlink($file); OC_Mount_Config::createCertificateBundle(); |