Skip to content

Commit 7a65b8a

Browse files
committed
fix(google-meet): wrap malformed node host params
1 parent 348ffe6 commit 7a65b8a

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Docs: https://docs.openclaw.ai
4747
- Voice-call realtime: ignore malformed provider media-frame base64 before forwarding audio into bridge and transcription paths.
4848
- QQBot: reject malformed stored cron payload base64 before JSON decoding structured reminder data.
4949
- Telnyx voice-call: use the raw `client_state` fallback when webhook state is malformed base64 instead of using silently corrupted decoded text.
50+
- Google Meet: report malformed node-host params JSON with plugin-owned errors instead of leaking raw JSON parser failures.
5051
- Models config/auth: stop inferring provider env-var markers from broad `^[A-Z_][A-Z0-9_]*$` strings, and resolve config-backed provider `apiKey` values only through structured env SecretRefs (`secrets.providers[id]` / `secrets.defaults`), so unrelated env vars cannot accidentally become provider credentials. Thanks @sallyom.
5152
- Media fetch: skip allocating and buffering the response body for bodyless media responses (HEAD probes and 204-style empty bodies), avoiding wasted heap on streams that carry no payload. Thanks @shakkernerd.
5253
- CLI/onboarding: forward provider-specific auth flags (e.g. `--openai-api-key`) through the onboarding wizard so they reach provider auth methods via `ctx.opts`, letting `--openai-api-key "$OPENAI_API_KEY"` skip the redundant "use existing env var?" prompt in non-interactive harnesses. (#81669) Thanks @sjf.

extensions/google-meet/node-host.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ describe("google-meet node host bridge sessions", () => {
5151
vi.resetModules();
5252
});
5353

54+
it("reports malformed params JSON with an owned error", async () => {
55+
const { handleGoogleMeetNodeHostCommand } = await import("./src/node-host.js");
56+
57+
await expect(handleGoogleMeetNodeHostCommand("{not json")).rejects.toThrow(
58+
"Google Meet node host received malformed params JSON.",
59+
);
60+
});
61+
5462
it("starts observe-only Chrome without BlackHole or bridge processes", async () => {
5563
const { handleGoogleMeetNodeHostCommand } = await import("./src/node-host.js");
5664
const originalPlatform = process.platform;

extensions/google-meet/src/node-host.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,14 @@ function stopChrome(params: Record<string, unknown>) {
473473
}
474474

475475
export async function handleGoogleMeetNodeHostCommand(paramsJSON?: string | null): Promise<string> {
476-
const raw = paramsJSON ? JSON.parse(paramsJSON) : {};
476+
let raw: unknown = {};
477+
if (paramsJSON) {
478+
try {
479+
raw = JSON.parse(paramsJSON) as unknown;
480+
} catch {
481+
throw new Error("Google Meet node host received malformed params JSON.");
482+
}
483+
}
477484
const params = asRecord(raw);
478485
const action = readString(params.action);
479486
let result: unknown;

0 commit comments

Comments
 (0)