mirror of
https://github.com/minio/minio.git
synced 2026-02-04 18:00:15 -05:00
fs/erasure: Ignore objects with / even for DeleteObject() (#4303)
Additionally GetObject() also returns errFileNotFound similar to HeadObject(). Fixes #4302
This commit is contained in:
@@ -36,6 +36,10 @@ func checkBucketAndObjectNames(bucket, object string) error {
|
||||
}
|
||||
// Verify if object is valid.
|
||||
if !IsValidObjectName(object) {
|
||||
// Objects with "/" are invalid, verify to return a different error.
|
||||
if hasSuffix(object, slashSeparator) || hasPrefix(object, slashSeparator) {
|
||||
return traceError(ObjectNotFound{Bucket: bucket, Object: object})
|
||||
}
|
||||
return traceError(ObjectNameInvalid{Bucket: bucket, Object: object})
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user