mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -05:00
server: Validate path for bad components in a handler. (#4170)
This commit is contained in:
@@ -131,6 +131,9 @@ func IsValidObjectName(object string) bool {
|
||||
// IsValidObjectPrefix verifies whether the prefix is a valid object name.
|
||||
// Its valid to have a empty prefix.
|
||||
func IsValidObjectPrefix(object string) bool {
|
||||
if hasBadPathComponent(object) {
|
||||
return false
|
||||
}
|
||||
if len(object) > 1024 {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user