- Sort Score
- Num 10 results
- Language All
Results 1 - 4 of 4 for hasBadPathComponent (0.21 seconds)
-
cmd/generic-handlers_test.go
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 6.2K bytes - Click Count (0) -
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 { n := len(path) if n > 32<<10 { // At 32K we are beyond reasonable. return true } i := 0 // Skip leading slashes (for sake of Windows \ is included as well)
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 20.7K bytes - Click Count (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
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Sun Sep 28 20:59:21 GMT 2025 - 99.7K bytes - Click Count (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
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Wed Jun 25 15:08:54 GMT 2025 - 37.3K bytes - Click Count (0)