MCPcopy Create free account
hub / github.com/AbelChe/evil_minio / IsValidObjectName

Function IsValidObjectName

cmd/object-api-utils.go:151–159  ·  view source on GitHub ↗

IsValidObjectName verifies an object name in accordance with Amazon's requirements. It cannot exceed 1024 characters and must be a valid UTF8 string. See: http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html You should avoid the following characters in a key name because of significan

(object string)

Source from the content-addressed store, hash-verified

149//
150// additionally minio does not support object names with trailing SlashSeparator.
151func IsValidObjectName(object string) bool {
152 if len(object) == 0 {
153 return false
154 }
155 if HasSuffix(object, SlashSeparator) {
156 return false
157 }
158 return IsValidObjectPrefix(object)
159}
160
161// IsValidObjectPrefix verifies whether the prefix is a valid object name.
162// Its valid to have a empty prefix.

Callers 2

TestIsValidObjectNameFunction · 0.85
checkObjectArgsFunction · 0.85

Calls 2

HasSuffixFunction · 0.85
IsValidObjectPrefixFunction · 0.85

Tested by 1

TestIsValidObjectNameFunction · 0.68