Merge pull request #35681 from nextcloud/backport/35391/stable20

[stable20] Make sure that path is normalized and then checked and not the other way around
This commit is contained in:
Vincent Petry 2022-12-16 16:27:51 +01:00 committed by GitHub
commit f6bbf59c23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,10 +67,11 @@ class Folder extends Node implements \OCP\Files\Folder {
* @throws \OCP\Files\NotPermittedException
*/
public function getFullPath($path) {
$path = $this->normalizePath($path);
if (!$this->isValidPath($path)) {
throw new NotPermittedException('Invalid path');
}
return $this->path . $this->normalizePath($path);
return $this->path . $path;
}
/**