- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for hasBadPathComponent (0.2 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...
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 20.5K bytes - Viewed (0) -
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
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 04 11:32:32 UTC 2024 - 99.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
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 08 15:29:58 UTC 2024 - 37.1K bytes - Viewed (0)