mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-12-01 09:24:46 +00:00
App grants: re-check the webhook host is public on every delivery
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f19b817c70
commit
4990e46fc4
3 changed files with 19 additions and 2 deletions
|
|
@ -185,3 +185,11 @@ test("an unknown nonce or a bad manifest is refused", async () => {
|
|||
manifests.set("nonce-badhook-0001", { ...manifest(), webhook_url: "https://elsewhere.test/hook" });
|
||||
assert.equal((await open("nonce-badhook-0001")).status, 502);
|
||||
});
|
||||
|
||||
test("a webhook host that now resolves privately gets no delivery", async () => {
|
||||
const { sendWebhook } = await import("../src/lib/app-grants.mjs");
|
||||
let called = false;
|
||||
const r = await sendWebhook("https://localhost.localdomain./hook", "s".repeat(40), {}, { fetchImpl: async () => ((called = true), new Response("ok")) });
|
||||
assert.equal(r.ok, false);
|
||||
assert.equal(called, false);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue