Closed pilar6195 closed 1 year ago
Looked into it a bit more and the issue occurs is if the type is missing from the Content-Disposition
header.
All of the media files that I noticed this error occurring on have the Content-Disposition
header formatted like filename="some_filename.png"
instead of something like attachment; filename="some_filename.png"
. If the type is missing the parse
function throws that invalid type format
error.
i have this issue also in recent versions
つまりMastodonのバグですか?
Edit: Pleromaか https://git.pleroma.social/pleroma/pleroma/-/blob/e853cfe7c3438650fd0f95bfe69e2bccfe12390c/lib/pleroma/web/plugs/uploaded_media.ex#L40
規格外だからまあPleromaのバグ?
(HTTPヘッダーなんて規格外の値が突っ込まれるのは割とあるのでこのくらいエラーにしないでおくれと思った)
他にも原因がある気がするけどとりあえずinvalidとしてマークしてclose
Yeah, I realized after that it's not exactly an issue with misskey but regardless there should still be better error handling for these cases which I see has been done now. 👍
💡 Summary
I recently updated my instance to the most recent version (v13.11.3) and right after I noticed that some user's profile avatars were not loading. Checking the network tab would show a http 500 error for the image.
I also noticed that new posts containing images from these same users are no longer appearing on my instance. I confirmed that there indeed were new posts by viewing the user's profile on the remote instance directly. The posts that did not appear on my instance all contained images.
I believe that this is related to how misskey handles remote media as this seems to only affect certain remote media urls.
This also happens on the main misskey.io instance.
🥰 Expected Behavior
The user's avatar image and posts containing media should load.
🤬 Actual Behavior
The user's avatar image throws a http 500 error and any posts containing media does not appear.
Here is the error that I get in the server console whenever the affected remote profile avatar/post containing media is fetched.
I was able to track down the error to the following line.
https://github.com/misskey-dev/misskey/blob/c5d2dba28d1e99f9c152840ca7f47e8f51c7423b/packages/backend/src/core/DownloadService.ts#L89
Based on this I believe the issue is a result of this commit 2d551a8598de12210ddb7f708561e51867ce3f10. If I revert to v13.9.1 (version right before this commit) the issue disappears and affected remote user avatars and media posts load again.
One of the accounts that is affected, and I tested with is
@NekoBot@bae.st
Should also note that I tested this on a fresh instance on both the latest and v13.9.1 versions.
📝 Steps to Reproduce
📌 Environment
Misskey version: 13.11.2 Your OS: Windows 10 22H2 (19045.2846) Your browser: Microsoft Edge 114.0.1788.0 (Official build) dev (64-bit)