Browse Source

Bug fix: empty key in DeleteMultipleObjects request caused bucket delete (#3939)

pull/3947/head
pavelzhurov 2 years ago
committed by GitHub
parent
commit
abe4a61659
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      weed/s3api/s3api_object_handlers.go

3
weed/s3api/s3api_object_handlers.go

@ -277,6 +277,9 @@ func (s3a *S3ApiServer) DeleteMultipleObjectsHandler(w http.ResponseWriter, r *h
// delete file entries
for _, object := range deleteObjects.Objects {
if object.ObjectName == "" {
continue
}
lastSeparator := strings.LastIndex(object.ObjectName, "/")
parentDirectoryPath, entryName, isDeleteData, isRecursive := "", object.ObjectName, true, false
if lastSeparator > 0 && lastSeparator+1 < len(object.ObjectName) {

Loading…
Cancel
Save