mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-28 07:57:01 +00:00
fix:Fix some errors tested in mint (#507)
* refactor: replace new_object_layer_fn with get_validated_store for bucket validation * feat: add validation for object tagging limits and uniqueness * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * feat: add EntityTooSmall error for multipart uploads and update error handling * feat: validate max_parts input range for S3 multipart uploads * Update rustfs/src/storage/ecfs.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: optimize tag key and value length validation checks --------- Co-authored-by: damon <damonxue2@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -5268,10 +5268,16 @@ impl StorageAPI for SetDisks {
|
||||
|
||||
if (i < uploaded_parts.len() - 1) && !is_min_allowed_part_size(ext_part.actual_size) {
|
||||
error!(
|
||||
"complete_multipart_upload is_min_allowed_part_size err {:?}, part_id={}, bucket={}, object={}",
|
||||
ext_part.actual_size, p.part_num, bucket, object
|
||||
"complete_multipart_upload part size too small: part {} size {} is less than minimum {}",
|
||||
p.part_num,
|
||||
ext_part.actual_size,
|
||||
GLOBAL_MIN_PART_SIZE.as_u64()
|
||||
);
|
||||
return Err(Error::InvalidPart(p.part_num, ext_part.etag.clone(), p.etag.clone().unwrap_or_default()));
|
||||
return Err(Error::EntityTooSmall(
|
||||
p.part_num,
|
||||
ext_part.actual_size,
|
||||
GLOBAL_MIN_PART_SIZE.as_u64() as i64,
|
||||
));
|
||||
}
|
||||
|
||||
object_size += ext_part.size;
|
||||
|
||||
Reference in New Issue
Block a user