Repository navigation
Buffer can publish posts with a photo - #2365
Merged
Merged
Conversation
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.
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.
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/mediaanswered 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 fromMastodonApi.MediaController). The picture is still decoded afterwards, so a text file callednotes.jpgstays 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.