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. |
||
|---|---|---|
| .. | ||
| crypto.go | ||
| crypto_test.go | ||
| debug.go | ||
| extraheaders.go | ||
| extraheaders_test.go | ||
| filesize.go | ||
| fileutil.go | ||
| httputil.go | ||
| inject.go | ||
| inject_test.go | ||
| json.go | ||
| log_sanitize.go | ||
| presign.go | ||
| presign_test.go | ||
| security.go | ||
| security_test.go | ||
| taskid.go | ||