Merge pull request #59827 from nextcloud/backport/59597/stable31

This commit is contained in:
Benjamin Gaussorgues 2026-04-29 16:34:45 +02:00 committed by GitHub
commit 911c79f076
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -648,6 +648,12 @@ class AmazonS3 extends Common {
// sub folders
if (is_array($result['CommonPrefixes'])) {
foreach ($result['CommonPrefixes'] as $prefix) {
if (preg_match('/\/{2,}$/', $prefix['Prefix'])) {
$this->logger->warning('Detected a repeating delimiter in prefix \'' . $prefix['Prefix']
. '\'. This is unsupported and its contents have been ignored.');
continue;
}
$dir = $this->getDirectoryMetaData($prefix['Prefix']);
if ($dir) {
yield $dir;