Skip to content
Snippets Groups Projects
Commit 9ab887fe authored by Björn Schießle's avatar Björn Schießle
Browse files

fix security issue, don't allow to go back in the path

parent a7292e89
Branches
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
$view = \OCP\Files::getStorage("files_external");
$cert = $_POST['cert'];
$cert = ltrim($_POST['cert'], "/.");
$file = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'.$cert;
unlink($file);
OC_Mount_Config::createCertificateBundle();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment