Skip to content

Commit 8cbac43

Browse files
fix(media): decode remote URL fallback filenames
1 parent ea88d25 commit 8cbac43

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Docs: https://docs.openclaw.ai
1717
- Agents/subagents: recover stale completion announces by retrying unsupported transcript-wait wakes without transcript waiting and forcing a message-tool handoff when the requester run is already stale. Fixes #83699. (#83700) Thanks @galiniliev.
1818
- Agents/subagents: skip stale embedded-run wake probes for dormant completion requesters, so late subagent completions go straight to requester-agent/direct handoff instead of producing `reason=no_active_run` queue noise. (#82964) Thanks @galiniliev.
1919
- CLI: retry config snapshot reads after a transient failure so one rejected read no longer poisons later commands in the same process. (#83931) Thanks @honor2030.
20-
- Media: decode URL path basenames before using them as remote media fallback filenames, so files like `My%20Report.pdf` are surfaced as `My Report.pdf`. Fixes #84050.
20+
- Media: decode URL path basenames before using them as remote media fallback filenames, so files like `My%20Report.pdf` are surfaced as `My Report.pdf`. Fixes #84050. (#84052) Thanks @jbetala7.
2121
- WhatsApp: clarify inbound group diagnostics so observed but unregistered groups point to `channels.whatsapp.groups` without changing routing or sender authorization. (#83846) Thanks @neeravmakwana.
2222
- WhatsApp: drain pending outbound deliveries on a 30s periodic timer in addition to the reconnect handler, so messages enqueued while the provider is already connected no longer wait for the next reconnect to send. (#79083) Thanks @Oviemudiaga.
2323
- CLI/TUI: include gateway plugin slash commands in TUI autocomplete, so connected sessions can suggest plugin-owned commands exposed by the running Gateway. (#83640) Thanks @se7en-agent.

src/media/fetch.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ describe("readRemoteMediaBuffer", () => {
624624
it.each([
625625
["https://example.com/files/reports%2FQ1.pdf", "reports_Q1.pdf"],
626626
["https://example.com/files/reports%5CQ1.pdf", "reports_Q1.pdf"],
627+
["https://example.com/files/reports%2F%2FQ1.pdf", "reports__Q1.pdf"],
627628
])(
628629
"keeps decoded URL fallback separators inside the selected basename",
629630
async (url, fileName) => {

src/media/fetch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ function basenameFromUrlPathname(pathname: string): string {
135135
return "";
136136
}
137137
try {
138-
return decodeURIComponent(base).replace(/[\\/]+/g, "_");
138+
return decodeURIComponent(base).replace(/[\\/]/g, "_");
139139
} catch {
140140
return base;
141141
}

0 commit comments

Comments
 (0)