MCPcopy Create free account
hub / github.com/cortexproject/cortex / containsUnsafePathSegments

Function containsUnsafePathSegments

pkg/util/users/resolver.go:67–70  ·  view source on GitHub ↗

containsUnsafePathSegments will return true if the string is a directory reference like `.` and `..` or if any path separator character like `/` and `\` can be found.

(id string)

Source from the content-addressed store, hash-verified

65// reference like `.` and `..` or if any path separator character like `/` and
66// `\` can be found.
67func containsUnsafePathSegments(id string) bool {
68 // handle the relative reference to current and parent path.
69 return id == "." || id == ".."
70}
71
72func (t *SingleResolver) TenantID(ctx context.Context) (string, error) {
73 //lint:ignore faillint wrapper around upstream method

Callers 1

CheckTenantIDIsSupportedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected