Skip to content

Commit 8f0bd03

Browse files
test: cover direct send origin guard
1 parent 331c226 commit 8f0bd03

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Every installed plugin gets the same treatment, not only pstack.
2424

2525
![Cursor Team Kit](screens/07-cursor-team-kit.png)
2626

27-
Marketplace listings show catalog copy and offer an install path.
27+
Marketplace listings show catalog copy and can be sent to a bot.
2828

2929
![Marketplace](screens/08-marketplace.png)
3030

‎test/server.test.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ test("/api/send messages gbot directly and the Applier API is gone", async () =>
108108
headers: { "content-type": "text/plain", origin: "https://attacker.example", "sec-fetch-site": "cross-site" },
109109
body: "{}",
110110
}), 403);
111+
assert.equal(await status("/api/send", {
112+
method: "POST",
113+
headers: { "content-type": "application/json", origin: "https://attacker.example" },
114+
body: "{}",
115+
}), 403);
111116
assert.equal(await status("/api/send", {
112117
method: "POST",
113118
headers: { "content-type": "application/json" },

0 commit comments

Comments
 (0)