diff options
author | Robin Appelman <robin@icewind.nl> | 2020-07-10 14:18:40 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2020-07-10 14:18:40 +0200 |
commit | e357d46863e02bb896185fc4604d05e51f7b4422 (patch) | |
tree | 7a1478b1130692f4cada7e38d0e3110dac4424c8 /lib/private/Files/Storage/Common.php | |
parent | 18acb137d3b973f04ee039fd4a4e8ed1bca25127 (diff) | |
download | nextcloud-server-e357d46863e02bb896185fc4604d05e51f7b4422.tar.gz nextcloud-server-e357d46863e02bb896185fc4604d05e51f7b4422.zip |
filter files containing a hash in the path for ftp storages
the php ftp streamwrapper doesn't handle hashes correctly and will break when it tries to enter a path containing a hash.
By filtering out paths containing a hash we can at least stop the external storage from breaking completely
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/Storage/Common.php')
-rw-r--r-- | lib/private/Files/Storage/Common.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php index 6c57405619a..a62b7d727fb 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -876,7 +876,10 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage { while (($file = readdir($dh)) !== false) { if (!Filesystem::isIgnoredDir($file) && !Filesystem::isFileBlacklisted($file)) { $childPath = $basePath . '/' . trim($file, '/'); - yield $this->getMetaData($childPath); + $metadata = $this->getMetaData($childPath); + if ($metadata !== null) { + yield $metadata; + } } } } |