- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for hasBadPathComponent (0.27 sec)
-
cmd/generic-handlers.go
return nil } _, err := xnet.ParseHost(host) return err } // Check if the incoming path has bad path components, // such as ".." and "." func hasBadPathComponent(path string) bool { if len(path) > 4096 { // path cannot be greater than Linux PATH_MAX // this is to avoid a busy loop, that can happen // if the caller sends path of following style // a/a/a/a/a/a/a/a...
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Apr 11 01:08:52 GMT 2024 - 20.7K bytes - Viewed (0) -
cmd/object-api-utils.go
} return IsValidObjectPrefix(object) } // 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 !utf8.ValidString(object) { return false } if strings.Contains(object, `//`) { return false } // This is valid for AWS S3 but it will never
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Mon Mar 11 11:55:34 GMT 2024 - 35.6K bytes - Viewed (1) -
cmd/admin-handlers.go
writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInvalidRequest), r.URL) return } file = filepath.ToSlash(file) // Reject attempts to traverse parent or absolute paths. if hasBadPathComponent(volume) || hasBadPathComponent(file) { writeErrorResponse(r.Context(), w, errorCodes.ToAPIErr(ErrInvalidResourceName), r.URL) return } var publicKey *rsa.PublicKey
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sun Apr 21 11:43:18 GMT 2024 - 97.3K bytes - Viewed (2)