openclaw - ✅(Solved) Fix [Bug]: 2026.4.5 regression: Slack private file images no longer visible (SSRF redirect fix breaks url_private_download fetch) [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#62960Fetched 2026-04-09 08:00:08
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Participants
Assignees
Timeline (top)
labeled ×2assigned ×1closed ×1commented ×1

After upgrading to 2026.4.5, images shared in Slack stopped being visible to the agent. Downgrading to 2026.4.2 immediately restored the behavior.

Error Message

No error is shown. The fetch returns an HTML login page (url_private_download Consequence: Agent silently ignores all Slack image attachments with no error message

Root Cause

After upgrading to 2026.4.5, images shared in Slack stopped being visible to the agent. Downgrading to 2026.4.2 immediately restored the behavior.

Fix Action

Fix / Workaround

  1. Upgrade OpenClaw to 2026.4.5.
  2. Send an image file in Slack to the agent.
  3. Observe that the agent cannot see the image (silently dropped).
  4. Downgrade to 2026.4.2 — image is visible again immediately.

Last known good version: 2026.4.2 (d74a122) First known bad version: 2026.4.5 (3e72c03), introduced with the SSRF redirect fix. Workaround: downgrade to 2026.4.2 via: npm install -g [email protected] --prefix ~/.npm-global && openclaw restart

PR fix notes

PR #62996: fix(slack): preserve auth on same-origin media redirects

Description (problem / solution / changelog)

Summary

  • Problem: Slack url_private_download fetches lost Authorization on same-origin files.slack.com redirects, so image attachments degraded into HTML login pages and were dropped.
  • Why it matters: Slack agents on current releases silently miss shared image attachments.
  • What changed: moved auth into requestInit, kept the guarded fetch wrapper for dispatcher-backed requests, and added regression coverage for same-origin auth preservation plus cross-origin auth stripping.
  • What did NOT change (scope boundary): no Slack CDN allowlist expansion, no generic SSRF redirect-policy changes, and no non-Slack media behavior.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #62960
  • Related #62239
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: extensions/slack/src/monitor/media.ts managed the bearer token outside the shared guarded-fetch redirect flow. It sent auth on the first hop, then unconditionally deleted Authorization on every subsequent hop.
  • Missing detection / guardrail: we did not have a regression test covering same-origin Slack redirects through the real resolveSlackMedia path.
  • Contributing context (if known): the regression showed up after the SSRF redirect changes in 2026.4.5, but the actual bug was Slack-specific auth handling layered on top of that shared guard.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: extensions/slack/src/monitor/media.test.ts
  • Scenario the test should lock in: same-origin files.slack.com redirects keep Authorization; cross-origin Slack CDN redirects strip it.
  • Why this is the smallest reliable guardrail: it exercises the real Slack media download path without needing a live Slack workspace.
  • Existing test that already covers this (if any): none for the same-origin redirect case.
  • If no new test is added, why not: N/A

User-visible / Behavior Changes

Slack image attachments served through url_private_download load again instead of being silently dropped after a login-page redirect.

Diagram (if applicable)

Before:
[Slack image upload] -> [files.slack.com redirect] -> [auth stripped too early] -> [HTML login page] -> [attachment dropped]

After:
[Slack image upload] -> [same-origin redirect keeps auth] -> [cross-origin redirect strips auth] -> [binary media fetched]

Security Impact (required)

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? Yes
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No
  • If any Yes, explain risk + mitigation: the bearer token now stays attached only on same-origin Slack redirects. Cross-origin redirects still pass through the shared guarded-fetch stripping logic, so we do not widen token exposure beyond Slack's original host.

Repro + Verification

Environment

  • OS: macOS host worktree verification
  • Runtime/container: local Node 25.8.2 / pnpm 10.32.1
  • Model/provider: N/A
  • Integration/channel (if any): Slack
  • Relevant config (redacted): N/A

Steps

  1. Mock a Slack media download that redirects from https://files.slack.com/... to a same-origin path.
  2. Verify the second request still carries Authorization.
  3. Mock a redirect to https://downloads.slack-edge.com/... and verify auth is stripped there.

Expected

  • Same-origin redirects keep the bearer token.
  • Cross-origin Slack CDN redirects strip the bearer token.
  • resolveSlackMedia returns the saved attachment instead of null.

Actual

  • Verified by the new regression tests and the targeted local run below.

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

  • Verified scenarios: pnpm test extensions/slack/src/monitor/media.test.ts; pnpm build; targeted oxlint and oxfmt --check on the touched files.
  • Edge cases checked: same-origin redirect auth preservation, cross-origin redirect auth stripping, dispatcher-backed runtime fetch path.
  • What you did not verify: I did not get a clean repo-wide pnpm lint or pnpm test gate because current main has unrelated failures, and the default core sparse profile initially hid ui/, packages/, and OpenClawKit resource paths until I materialized them.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

  • Risk: preserving auth on redirects could accidentally keep tokens on the wrong host if the redirect-origin check were wrong.
    • Mitigation: auth now rides through the shared guarded-fetch flow, which preserves headers only for same-origin redirects and strips them on cross-origin hops.

Changed files

  • CHANGELOG.md (modified, +4/-0)
  • extensions/slack/src/monitor/media.test.ts (modified, +84/-7)
  • extensions/slack/src/monitor/media.ts (modified, +41/-35)

Code Example

Slack Socket mode. The regression is unrelated to the model/provider — 
it occurs in the Slack file fetch layer (actions-ClxauASC.js) before 
any LLM call is made. Confirmed by source code inspection:
Authorization header is stripped on redirect (line 52), causing 
url_private_download to return HTML instead of the image binary.
Fix: preserve Bearer token for redirects within files.slack.com 
in SLACK_MEDIA_SSRF_POLICY.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

After upgrading to 2026.4.5, images shared in Slack stopped being visible to the agent. Downgrading to 2026.4.2 immediately restored the behavior.

Steps to reproduce

  1. Upgrade OpenClaw to 2026.4.5.
  2. Send an image file in Slack to the agent.
  3. Observe that the agent cannot see the image (silently dropped).
  4. Downgrade to 2026.4.2 — image is visible again immediately.

Expected behavior

In 2026.4.2, images shared via Slack (url_private_download) were fetched correctly and visible to the agent. The Bearer token was preserved across the redirect from files.slack.com.

Actual behavior

Images shared in Slack are silently dropped and not visible to the agent. No error is shown. The fetch returns an HTML login page (url_private_download redirects without Authorization header), which is detected and discarded at actions-ClxauASC.js line 135.

OpenClaw version

2026.4.5 (3e72c03)

Operating system

Ubuntu 24.04

Install method

npm global (--prefix ~/.npm-global)

Model

openai-codex/gpt-5.4

Provider / routing chain

openclaw -> anthropic-->openai

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Slack Socket mode. The regression is unrelated to the model/provider — 
it occurs in the Slack file fetch layer (actions-ClxauASC.js) before 
any LLM call is made. Confirmed by source code inspection:
Authorization header is stripped on redirect (line 52), causing 
url_private_download to return HTML instead of the image binary.
Fix: preserve Bearer token for redirects within files.slack.com 
in SLACK_MEDIA_SSRF_POLICY.

Impact and severity

Affected: All Slack users on 2026.4.5 using Socket mode Severity: High (blocks workflow — agent cannot see any images shared in Slack) Frequency: 100% reproducible — every image share fails Consequence: Agent silently ignores all Slack image attachments with no error message

Additional information

Last known good version: 2026.4.2 (d74a122) First known bad version: 2026.4.5 (3e72c03), introduced with the SSRF redirect fix. Workaround: downgrade to 2026.4.2 via: npm install -g [email protected] --prefix ~/.npm-global && openclaw restart

Likely fix: in SLACK_MEDIA_SSRF_POLICY, preserve the Authorization: Bearer header when following redirects whose destination hostname is files.slack.com (same trusted domain as the original request target).

extent analysis

TL;DR

Preserve the Authorization: Bearer header in SLACK_MEDIA_SSRF_POLICY for redirects within files.slack.com to fix the image sharing issue in Slack.

Guidance

  • Verify the issue by checking if the Authorization header is being stripped on redirect in the Slack file fetch layer, specifically in actions-ClxauASC.js at line 52.
  • To mitigate the issue, downgrade to OpenClaw version 2026.4.2 using the provided workaround command: npm install -g [email protected] --prefix ~/.npm-global && openclaw restart.
  • Investigate modifying SLACK_MEDIA_SSRF_POLICY to preserve the Bearer token for redirects within files.slack.com, as this is the likely cause of the regression.
  • Test the fix by sending an image file in Slack to the agent and verifying that the image is visible, and the fetch returns the image binary instead of an HTML login page.

Example

No code snippet is provided as the fix involves modifying the SLACK_MEDIA_SSRF_POLICY, which is not explicitly defined in the issue.

Notes

The provided workaround downgrading to 2026.4.2 is a temporary solution, and the actual fix should involve preserving the Authorization header in SLACK_MEDIA_SSRF_POLICY.

Recommendation

Apply the workaround by downgrading to OpenClaw version 2026.4.2, as this is a known good version that restores the expected behavior. This is a safer option until the root cause is fully addressed and a permanent fix is implemented.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

In 2026.4.2, images shared via Slack (url_private_download) were fetched correctly and visible to the agent. The Bearer token was preserved across the redirect from files.slack.com.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING