mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 18:51:23 +00:00
fix(security): scope session tools and webhook secret fallback
This commit is contained in:
@@ -219,4 +219,27 @@ describe("monitorTelegramProvider (grammY)", () => {
|
||||
);
|
||||
expect(runSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("falls back to configured webhookSecret when not passed explicitly", async () => {
|
||||
await monitorTelegramProvider({
|
||||
token: "tok",
|
||||
useWebhook: true,
|
||||
webhookUrl: "https://example.test/telegram",
|
||||
config: {
|
||||
agents: { defaults: { maxConcurrent: 2 } },
|
||||
channels: {
|
||||
telegram: {
|
||||
webhookSecret: "secret-from-config",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
expect(startTelegramWebhookSpy).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
secret: "secret-from-config",
|
||||
}),
|
||||
);
|
||||
expect(runSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user