Browse Source

Update s3api_bucket_handlers.go

pull/7519/head
chrislu 2 months ago
parent
commit
7c82e1a3d1
  1. 6
      weed/s3api/s3api_bucket_handlers.go

6
weed/s3api/s3api_bucket_handlers.go

@ -132,6 +132,12 @@ func isBucketVisibleToIdentity(entry *filer_pb.Entry, identity *Identity) bool {
return true
}
// Non-admin users with no name cannot own or see buckets.
// This prevents misconfigured identities from matching buckets with empty owner IDs.
if identity.Name == "" {
return false
}
// Non-admin users: check ownership
// Use the authenticated identity value directly (cannot be spoofed)
id, ok := entry.Extended[s3_constants.AmzIdentityId]

Loading…
Cancel
Save