Addresses review feedback on the IM storage URL rewrite: - localFileService.GetFileURL now reads tenant ID from request context first, falling back to ParseTenantIDFromStoragePath only when context is absent. Fixes ambiguity for cloud providers whose paths embed numeric bucket/region names before the tenant segment, which could mint presigned URLs bound to the wrong tenant ID. - Shorten presigned URL default TTL from 24h to 2h. A leaked HMAC key authorizes cross-tenant file reads, so URLs should expire quickly; IM clients fetch referenced images within seconds anyway. - Document ParseTenantIDFromStoragePath as a best-effort fallback. - Add unit tests covering context-first, path-fallback, and the no-external-URL backward-compat path. |
||
|---|---|---|
| .. | ||
| cos.go | ||
| dummy.go | ||
| factory.go | ||
| local.go | ||
| local_test.go | ||
| minio.go | ||
| oss.go | ||
| oss_test.go | ||
| s3.go | ||
| s3_test.go | ||
| tos.go | ||