S3: reject part uploads after AbortMultipartUpload (#8768)
* S3: reject part uploads after AbortMultipartUpload
PutObjectPartHandler did not verify that the multipart upload session
still exists before accepting parts. After AbortMultipartUpload deleted
the upload directory, the ErrNotFound from getEntry was silently ignored
(treated as "may be non-SSE upload"), allowing parts to be stored as
orphaned files.
Now return ErrNoSuchUpload when the upload directory is not found,
matching AWS S3 behavior.
Fixes#8766
* S3: check upload existence unconditionally in PutObjectPartHandler
Move the getEntry call out of the SSE-type conditional so the upload
existence check runs for all part uploads, including SSE-C. Previously
the SSE-C path skipped the check entirely, allowing parts to be uploaded
after abort when SSE-C headers were present.
Also flattens the nested SSE branching by one level now that getEntry
is called once upfront.
* S3: address PR review feedback for PutObjectPartHandler
- Log at error level when getEntry fails with an unexpected error,
since we return ErrInternalError to the client
- Distinguish base IV decode errors from length validation failures
with separate, clearer error messages
---------
Co-authored-by: Copilot <copilot@github.com>
glog.V(4).Infof("Using stored base IV %x for multipart upload %s",baseIV[:8],uploadID)
}else{
glog.Errorf("Failed to decode base IV for multipart upload %s: %v (expected %d bytes, got %d)",uploadID,decodeErr,s3_constants.AESBlockSize,len(decodedIV))
}
}
// Base IV is required for SSE-KMS multipart uploads - fail if missing or invalid
iflen(baseIV)==0{
glog.Errorf("No valid base IV found for SSE-KMS multipart upload %s - cannot proceed with encryption",uploadID)