Skip to content

Buffer can publish posts with a photo - #2365

Merged
wintermeyer merged 1 commit into
mainfrom
worktree-bugfix-buffer
Oct 11, 2026
Merged

wintermeyer merged 1 commit into
mainfrom
worktree-bugfix-buffer

Conversation

@wintermeyer

Copy link
Copy Markdown
Owner

Buffer shows "An unknown error has occurred" for every post with a photo, while text-only posts arrive. In the access log each of those attempts is a POST /api/v2/media answered with 422.

The upload was judged by its filename's extension alone, and Buffer sends its pictures under a name without a usable one. Now the file's first bytes name the format whenever the filename does not (Vutuv.Uploads.image_extension_from_content/1, called from MastodonApi.MediaController). The picture is still decoded afterwards, so a text file called notes.jpg stays refused.

I could not see the filename Buffer sends: the log carries only the status and the body size, and that size matches the extension refusal exactly. The tests cover blob, a bare name, a name with a query string and .bin.

An AI agent wrote this text in my name. I know that is problematic.

Buffer meldete bei jedem Beitrag mit Foto „An unknown error has occurred“, während reine Textbeiträge ankamen: POST /api/v2/media antwortete jedes Mal mit 422. Die Annahme las das Format allein aus der Endung des Dateinamens, und Buffer schickt seine Bilder unter einem Namen ohne brauchbare Endung. Jetzt entscheiden die ersten Bytes der Datei, sobald der Name nichts Erlaubtes nennt, so wie Mastodon es auch hält. Dekodiert wird weiterhin, eine Textdatei mit Bildnamen bleibt also abgelehnt.

Diesen Text hat ein KI-Agent in meinem Namen geschrieben. Ich weiß, dass das problematisch ist.
@wintermeyer wintermeyer self-assigned this Oct 11, 2026
@wintermeyer
wintermeyer merged commit a449ec5 into main Oct 11, 2026
1 check passed
@wintermeyer
wintermeyer deleted the worktree-bugfix-buffer branch October 11, 2026 20:36
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.

1 participant