From 21c6cc45e610f47f7bb7a77132a8f2effd5a83f9 Mon Sep 17 00:00:00 2001 From: Björn Schießle <schiessle@owncloud.com> Date: Wed, 26 Sep 2012 23:08:40 +0200 Subject: take '\' on windows systems into account to prevent file deletion above upload direectory --- apps/files_external/ajax/removeRootCertificate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/files_external') 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(); -- cgit v1.2.3