mirror of
https://github.com/versity/versitygw.git
synced 2026-08-18 05:06:27 +00:00
Merge pull request #1975 from jvansanten/hide-non-bucket-dirs
Do not expose directories that can't be buckets
This commit is contained in:
@@ -365,6 +365,10 @@ func (p *Posix) ListBuckets(ctx context.Context, input s3response.ListBucketsInp
|
||||
continue
|
||||
}
|
||||
|
||||
if !utils.IsValidBucketName(fi.Name()) {
|
||||
continue
|
||||
}
|
||||
|
||||
if len(buckets) == int(input.MaxBuckets) {
|
||||
cToken = buckets[len(buckets)-1].Name
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user