We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7559560 commit ee7ad79Copy full SHA for ee7ad79
1 file changed
lib/private/Files/Storage/Local.php
@@ -321,7 +321,9 @@ private function checkTreeForForbiddenItems(string $path) {
321
/** @var \SplFileInfo $file */
322
foreach ($iterator as $file) {
323
if (!$this->getFilenameValidator()->isFilenameValid($file->getBasename())) {
324
- throw new ForbiddenException('Invalid path: ' . $file->getPathname(), false);
+ // Do not leak data dir
325
+ $filePath = substr($file->getPathname(), strlen($this->datadir));
326
+ throw new ForbiddenException('Invalid path: ' . $filePath, false);
327
}
328
329
0 commit comments