Avoid object names with '//' to avoid hash inconsistencies (#8946)
This is to fix a situation where an object name incorrectly is sent with '//' in its path heirarchy, we should reject such object names because they may be hashed to a set where the object might not originally belong because, this can cause situations where once object is uploaded we cannot delete it anymore. Fixes #8873
This commit is contained in:
@@ -162,6 +162,7 @@ func checkObjectArgs(ctx context.Context, bucket, object string, obj ObjectLayer
|
||||
if err := checkObjectNameForLengthAndSlash(bucket, object); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Validates object name validity after bucket exists.
|
||||
if !IsValidObjectName(object) {
|
||||
return ObjectNameInvalid{
|
||||
|
||||
Reference in New Issue
Block a user