mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-26 20:35:39 -06:00
fix(tlon): use native S3 endpoint parsing
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user