take '\' on windows systems into account to prevent file deletion above upload direectory
This commit is contained in:
parent
9ab887fed5
commit
21c6cc45e6
|
@ -5,7 +5,7 @@ OCP\JSON::checkLoggedIn();
|
||||||
OCP\JSON::callCheck();
|
OCP\JSON::callCheck();
|
||||||
|
|
||||||
$view = \OCP\Files::getStorage("files_external");
|
$view = \OCP\Files::getStorage("files_external");
|
||||||
$cert = ltrim($_POST['cert'], "/.");
|
$cert = ltrim($_POST['cert'], "/\\.");
|
||||||
$file = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'.$cert;
|
$file = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'.$cert;
|
||||||
unlink($file);
|
unlink($file);
|
||||||
OC_Mount_Config::createCertificateBundle();
|
OC_Mount_Config::createCertificateBundle();
|
||||||
|
|
Loading…
Reference in New Issue