Remove some logs caused by external apps (#16027)

This commit is contained in:
Anis Elleuch
2022-11-08 22:29:05 +01:00
committed by GitHub
parent 3b1a9b9fdf
commit 7260241511
4 changed files with 14 additions and 12 deletions

View File

@@ -41,16 +41,13 @@ func checkDelObjArgs(ctx context.Context, bucket, object string) error {
func checkBucketAndObjectNames(ctx context.Context, bucket, object string) error {
// Verify if bucket is valid.
if !isMinioMetaBucketName(bucket) && s3utils.CheckValidBucketName(bucket) != nil {
logger.LogIf(ctx, BucketNameInvalid{Bucket: bucket})
return BucketNameInvalid{Bucket: bucket}
}
// Verify if object is valid.
if len(object) == 0 {
logger.LogIf(ctx, ObjectNameInvalid{Bucket: bucket, Object: object})
return ObjectNameInvalid{Bucket: bucket, Object: object}
}
if !IsValidObjectPrefix(object) {
logger.LogIf(ctx, ObjectNameInvalid{Bucket: bucket, Object: object})
return ObjectNameInvalid{Bucket: bucket, Object: object}
}
if runtime.GOOS == globalWindowsOSName && strings.Contains(object, "\\") {