(s string)
| 86 | } |
| 87 | |
| 88 | func CheckTenantIDIsSupported(s string) error { |
| 89 | // check tenantID is "__markers__" |
| 90 | if s == GlobalMarkersDir { |
| 91 | return errTenantIDMarkers |
| 92 | } |
| 93 | |
| 94 | if s == "user-index.json.gz" { |
| 95 | return errTenantIDUserIndex |
| 96 | } |
| 97 | |
| 98 | // check tenantID is "." or ".." |
| 99 | if containsUnsafePathSegments(s) { |
| 100 | return errTenantIDUnsafe |
| 101 | } |
| 102 | |
| 103 | return nil |
| 104 | } |
| 105 | |
| 106 | func JoinTenantIDs(tenantIDs []string) string { |
| 107 | return strings.Join(tenantIDs, tenantIDsLabelSeparator) |
no test coverage detected