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

remotes/origin/stable45
Björn Schießle 12 years ago
parent a7292e897a
commit 9ab887fed5
  1. 2
      apps/files_external/ajax/removeRootCertificate.php

@ -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();

Loading…
Cancel
Save