mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-26 04:15:48 -06:00
fix: validate message timeout before secret resolution (#98652)
Co-authored-by: Peter Steinberger <58493+steipete@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ce4a259485
commit
909be7bcbc
@@ -457,6 +457,7 @@ describe("message tool gateway timeout", () => {
|
||||
timeoutMs,
|
||||
}),
|
||||
).rejects.toThrow("timeoutMs must be a positive integer");
|
||||
expect(mocks.resolveCommandSecretRefsViaGateway).not.toHaveBeenCalled();
|
||||
expect(mocks.runMessageAction).not.toHaveBeenCalled();
|
||||
},
|
||||
);
|
||||
|
||||
@@ -1348,6 +1348,7 @@ export function createMessageTool(options?: MessageToolOptions): AnyAgentTool {
|
||||
}
|
||||
}
|
||||
|
||||
const gatewayOpts = readGatewayCallOptions(params);
|
||||
const rawConfig = options?.config ?? loadConfigForTool();
|
||||
const scope = resolveMessageSecretScope({
|
||||
channel: params.channel,
|
||||
@@ -1413,7 +1414,7 @@ export function createMessageTool(options?: MessageToolOptions): AnyAgentTool {
|
||||
}
|
||||
}
|
||||
|
||||
const gatewayResolved = resolveGatewayOptions(readGatewayCallOptions(params));
|
||||
const gatewayResolved = resolveGatewayOptions(gatewayOpts);
|
||||
const gateway = {
|
||||
url: gatewayResolved.url,
|
||||
token: gatewayResolved.token,
|
||||
|
||||
Reference in New Issue
Block a user