fix(msteams): bound graph upload JSON reads#98948
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as a duplicate: this PR is a valid bounded-read fix, but #97784 already owns the same seven MS Teams graph-upload success JSON reads with stronger loopback proof and a clean mergeable state. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this duplicate and keep #97784 as the landing path for the seven graph-upload bounded reads. So I’m closing this here and keeping the remaining discussion on #97784. Review detailsBest possible solution: Close this duplicate and keep #97784 as the landing path for the seven graph-upload bounded reads. Do we have a high-confidence way to reproduce the issue? Yes, source-level. Current main still has raw successful Is this the best way to solve the issue? No for landing this branch. Reusing the shared helper is the right fix shape, but #97784 is the better landing path because it already covers the same seven reads with stronger proof. Security review: Security review cleared: The diff reuses an existing SDK HTTP helper and adds tests; it does not change dependencies, workflows, package metadata, permissions, auth headers, endpoints, or secret handling. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 2913d3aee90c. |
|
🦞✅ Reason: structured ClawSweeper close marker: close-required (sha=dfee6bdfb80c8cb702e1c99125c626911169c227) Closed:
|
What Problem This Solves
Fixes an issue where MS Teams Graph upload and sharing helpers could buffer an unbounded successful JSON response when reading drive item, sharing link, or chat metadata.
Why This Change Was Made
The Graph upload helpers now use the shared bounded provider JSON reader that other MS Teams Graph paths already use. Error responses were already bounded; this closes the matching successful-response path.
User Impact
A faulty or hostile Graph-compatible endpoint cannot force OpenClaw to buffer an oversized success metadata response, while normal Graph metadata responses continue to parse normally.
Evidence
node scripts/run-vitest.mjs extensions/msteams/src/graph-upload.test.ts -- --runfailed withunbounded response.json should not be called.node scripts/run-vitest.mjs extensions/msteams/src/graph-upload.test.ts -- --run-> 1 file / 12 tests passed.node_modules/.bin/oxfmt --check extensions/msteams/src/graph-upload.ts extensions/msteams/src/graph-upload.test.ts-> clean.node scripts/run-oxlint.mjs extensions/msteams/src/graph-upload.ts extensions/msteams/src/graph-upload.test.ts-> clean.git diff --check-> clean.Loopback proof with a real
node:httpserver streaming a 32 MiB successful Graph upload JSON response:AI-assisted: built with Codex