mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #59828 from nextcloud/backport/59597/stable32
[stable32] fix(s3): ignore prefixes with repeating delimiters
This commit is contained in:
commit
55e42231bf
1 changed files with 6 additions and 0 deletions
|
|
@ -645,6 +645,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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue