Skip to content

Cherry-pick e0571399a: fix(slack): reject HTML responses when downloading media#1427

Merged
alexey-pelykh merged 1 commit intomainfrom
cherry-pick/e0571399a-slack-reject-html
Mar 15, 2026
Merged

Cherry-pick e0571399a: fix(slack): reject HTML responses when downloading media#1427
alexey-pelykh merged 1 commit intomainfrom
cherry-pick/e0571399a-slack-reject-html

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Cherry-pick of upstream commit e0571399a — "fix(slack): reject HTML responses when downloading media (openclaw#4665)"

Conflicts resolved:

  • CHANGELOG.md — removed (deleted in fork)

Part of #677

* fix(slack): reject HTML responses when downloading media

Slack sometimes returns HTML login pages instead of binary media when
authentication fails or URLs expire. This change detects HTML responses
by checking content-type header and buffer content, then skips to the
next available file URL.

* fix: format import order and add braces to continue statement

* chore: format Slack media tests

* chore: apply formatter to Slack media tests

* fix(slack): merge auth-header forwarding and html media guard

---------

Co-authored-by: Tak Hoffman <[email protected]>
(cherry picked from commit e057139)
@alexey-pelykh alexey-pelykh merged commit 2f628fd into main Mar 15, 2026
7 checks passed
@alexey-pelykh alexey-pelykh deleted the cherry-pick/e0571399a-slack-reject-html branch March 15, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants