mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 17:18:25 +00:00
fix(aa-08): apply security fix
Generated by staged fix workflow.
This commit is contained in:
committed by
Peter Steinberger
parent
f8c404a485
commit
633fe8b9c1
@@ -31,6 +31,7 @@ describe("startTelegramWebhook", () => {
|
||||
const cfg = { bindings: [] };
|
||||
const { server } = await startTelegramWebhook({
|
||||
token: "tok",
|
||||
secret: "secret",
|
||||
accountId: "opie",
|
||||
config: cfg,
|
||||
port: 0, // random free port
|
||||
@@ -62,6 +63,7 @@ describe("startTelegramWebhook", () => {
|
||||
const cfg = { bindings: [] };
|
||||
const { server } = await startTelegramWebhook({
|
||||
token: "tok",
|
||||
secret: "secret",
|
||||
accountId: "opie",
|
||||
config: cfg,
|
||||
port: 0,
|
||||
@@ -82,4 +84,12 @@ describe("startTelegramWebhook", () => {
|
||||
expect(handlerSpy).toHaveBeenCalled();
|
||||
abort.abort();
|
||||
});
|
||||
|
||||
it("rejects startup when webhook secret is missing", async () => {
|
||||
await expect(
|
||||
startTelegramWebhook({
|
||||
token: "tok",
|
||||
}),
|
||||
).rejects.toThrow(/requires a non-empty secret token/i);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user