fix(tlon): use native S3 endpoint parsing

This commit is contained in:
Peter Steinberger
2026-07-14 14:53:03 +01:00
parent 8cd9ad023b
commit ec5e97eb78
3 changed files with 3 additions and 7 deletions
+1
View File
@@ -36,6 +36,7 @@ Docs: https://docs.openclaw.ai
### Fixes
- **Tlon custom S3 uploads:** pass storage endpoints through the AWS SDK's native parser so custom S3-compatible uploads no longer fail before presigning.
- **Agent auth storage locks:** surface normal release failures while avoiding redundant release attempts after `proper-lockfile` reports a compromised lock.
- **Paired-node session catalogs:** authorize bundled Anthropic and Codex catalog requests to invoke their read-only node commands from Control UI read flows, restoring remote Claude/Codex rows and terminal resume availability. Fixes #107406.
- **Sandbox recreate confirmation:** treat Clack cancellation as a decline so Ctrl-C cannot proceed with container removal.
+1
View File
@@ -496,6 +496,7 @@ describe("uploadFile custom S3 upload hardening", () => {
});
expect(result.url.startsWith("https://files.example.com/")).toBe(true);
expect((await mockGetSignedUrl.mock.calls[0]?.[0].config.endpoint()).protocol).toBe("https:");
expect(mockGuardedFetch).toHaveBeenCalledTimes(1);
const uploadCall = guardedFetchCall(0);
expect(uploadCall?.url).toBe("https://s3.example.com/uploads/file?sig=abc");
+1 -7
View File
@@ -335,13 +335,8 @@ export async function uploadFile(params: UploadFileParams): Promise<UploadResult
throw new Error("No storage credentials configured");
}
const endpoint = new URL(prefixEndpoint(credentials.endpoint));
const client = new S3Client({
endpoint: {
protocol: endpoint.protocol.slice(0, -1) as "http" | "https",
hostname: endpoint.host,
path: endpoint.pathname || "/",
},
endpoint: prefixEndpoint(credentials.endpoint),
region: storageConfig.region || "us-east-1",
credentials: {
accessKeyId: credentials.accessKeyId,
@@ -366,7 +361,6 @@ export async function uploadFile(params: UploadFileParams): Promise<UploadResult
const signedUrl = await getSignedUrl(client, command, {
expiresIn: 3600,
signableHeaders: new Set(Object.keys(headers)),
});
let release: (() => Promise<void>) | undefined;