fix(aa-08): apply security fix

Generated by staged fix workflow.
This commit is contained in:
Coy Geek
2026-02-09 20:20:35 -08:00
committed by Peter Steinberger
parent f8c404a485
commit 633fe8b9c1
2 changed files with 19 additions and 2 deletions

View File

@@ -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);
});
});