fix(media): treat legacy Word docs as binary attachments#73799
Conversation
Greptile SummaryAdds Confidence Score: 5/5This PR is safe to merge — the change is narrow, well-tested, and has no bypass paths. The fix is a two-line addition to an existing guard function, checked before any allowlist or heuristic logic. TEXT_EXT_MIME does not map .doc, so no forced-text override can bypass it. The new parameterised test covers both MIME types under the strongest allowlist condition. No files require special attention. Reviews (1): Last reviewed commit: "fix(media): treat legacy Word docs as bi..." | Re-trigger Greptile |
|
Codex review: needs maintainer review before merge. What this changes: The PR adds Maintainer follow-up before merge: This is already an open implementation PR with a narrow diff and no blocking automated review finding; the next action is maintainer review, validation, and merge or intentional replacement, not a separate repair PR. Security review: Security review cleared: The PR does not touch workflows, dependencies, lockfiles, scripts, permissions, secrets handling, generated/vendor code, or package metadata; the code change narrows binary prompt ingestion. Review detailsBest possible solution: Land this PR or an equivalent focused media-understanding guard after maintainer validation, then close #54176 as implemented and leave the earlier unmerged attempts closed with credit preserved. Do we have a high-confidence way to reproduce the issue? Yes. The current-main source path shows that Is this the best way to solve the issue? Yes. Adding these known legacy Word/OLE MIME values to the existing binary guard before text heuristics is the narrowest maintainable fix; dedicated Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 6308d2a1dcd4. |
f4c4238 to
4d82705
Compare
Summary
application/mswordandapplication/x-cfbbinary MIME guard for legacy.doc/OLE files.isBinaryMediaMime, addressing the Greptile review finding.Credit
Based on #54380 by @andyliu. Related prior reports/PRs include #54176, #44068, #54190, and #54234; preserve attribution for any reused reproduction or test detail.
Validation
pnpm check:changed/reviewclean before mergeFixes #54176 when landed.
ProjectClownfish replacement details:
! [remote rejected] HEAD -> codex/fix-54176-binary-doc (refusing to allow a GitHub App to create or update workflow
.github/workflows/auto-response.ymlwithoutworkflowspermission)error: failed to push some refs to 'https://github.com/andyliu/openclaw.git'