Cover overlong websocket request envelopes in runtime and smoke
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
8dd0ec5261
commit
6ad9bda3c6
2 files changed
+28
No files matched your search
@@ -2140,6 +2140,20 @@ async function main() {
|
||||
unexpected: true,
|
||||
}),
|
||||
);
|
||||
ws.send(
|
||||
JSON.stringify({
|
||||
type: "request",
|
||||
id: "x".repeat(300),
|
||||
method: "app.health",
|
||||
}),
|
||||
);
|
||||
ws.send(
|
||||
JSON.stringify({
|
||||
type: "request",
|
||||
id: "smoke-malformed-long-method",
|
||||
method: "m".repeat(300),
|
||||
}),
|
||||
);
|
||||
const postMalformedHealthResponse = await sendWsRequest(ws, {
|
||||
id: "smoke-health-after-malformed",
|
||||
method: "app.health",
|
||||
|
||||
@@ -756,6 +756,20 @@ describe("runtimeApiServer", () => {
|
||||
unexpected: true,
|
||||
}),
|
||||
);
|
||||
client.socket.send(
|
||||
JSON.stringify({
|
||||
type: "request",
|
||||
id: "x".repeat(300),
|
||||
method: "todos.list",
|
||||
}),
|
||||
);
|
||||
client.socket.send(
|
||||
JSON.stringify({
|
||||
type: "request",
|
||||
id: "malformed-long-method",
|
||||
method: "m".repeat(300),
|
||||
}),
|
||||
);
|
||||
|
||||
const response = await sendRequest(
|
||||
client.socket,
|
||||
|
||||
Reference in new issue
Block a user