fix(line): migrate media storage to saveMediaBuffer for sandbox compatibility#33145
Closed
carrotRakko wants to merge 1 commit into
Closed
fix(line): migrate media storage to saveMediaBuffer for sandbox compatibility#33145carrotRakko wants to merge 1 commit into
carrotRakko wants to merge 1 commit into
Conversation
Contributor
Greptile SummaryThis PR migrates LINE media downloads from ad-hoc Key changes:
The migration is correct, security properties are preserved, and existing test coverage is adequate. Confidence Score: 5/5
Last reviewed commit: 53672ac |
delight-ai-agent
force-pushed
the
fix/line-media-savemediabuffer-v2
branch
3 times, most recently
from
March 5, 2026 11:47
d3b0740 to
e3448fe
Compare
…tibility LINE media downloads use buildRandomTempFilePath (/tmp/openclaw/) which is outside the sandbox root, making downloaded files inaccessible to sandboxed agents. Migrate to the shared saveMediaBuffer() function (already used by Telegram, Discord, Signal) which stores files in ~/.openclaw/media/inbound/. Also extracts Content-Type from the LINE API HTTP response headers and passes originalFilename through to detectMime for better extension-based MIME fallback on file-type messages. Closes openclaw#27722 ✍️ Author: Claude Code with @carrotRakko (AI-written, human-approved)
delight-ai-agent
force-pushed
the
fix/line-media-savemediabuffer-v2
branch
from
March 6, 2026 03:37
e3448fe to
68189a3
Compare
|
Closing this PR because the author has more than 10 active PRs in this repo. Please reduce the active PR queue and reopen or resubmit once it is back under the limit. You can close your own PRs to get back under the limit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
buildRandomTempFilePath(/tmp/openclaw/) which is outside the sandbox root, making downloaded files inaccessible to sandboxed agentssaveMediaBuffer()(already used by Telegram, Discord, Signal) which stores files in~/.openclaw/media/inbound/. Also extracts Content-Type from HTTP response headers and passesoriginalFilenametodetectMimefor extension-based MIME fallbackChange Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
~/.openclaw/media/inbound/instead of/tmp/openclaw/Security Impact (required)
Repro + Verification
Environment
Steps
Expected
~/.openclaw/media/inbound/and accessible within sandboxActual
~/.openclaw/media/inbound/and accessible within sandboxEvidence
Tests rewritten to verify
saveMediaBufferintegration with correct parameters (buffer, contentType, "inbound" subdir, maxBytes, originalFilename).Human Verification (required)
Compatibility / Migration
Failure Recovery (if this breaks)
/tmp/openclaw/Risks and Mitigations
None
✍️ Author: Claude Code with @carrotRakko (AI-written, human-approved)