Handle special path names

This commit is contained in:
Adrian 2021-01-03 23:29:46 +01:00
parent 191c57e294
commit 2439b7ca12
1 changed files with 1 additions and 1 deletions

View File

@ -465,7 +465,7 @@ class Local extends \OC\Files\Storage\Common {
if ($realPath) {
$realPath = $realPath . '/';
}
if ($fileExists && substr($fullPath, 0, strlen($realPath)) === $realPath) {
if ($fileExists && rtrim($fullPath, '/.') === $fullPath && substr($fullPath, 0, strlen($realPath)) === $realPath) {
\OCP\Util::writeLog('core', "Cyclic symlinks are not allowed ('$fullPath' -> '$realPath')", ILogger::ERROR);
} elseif (substr($realPath, 0, $this->dataDirLength) === $this->realDataDir) {
return $fullPath;