Remote APNG attachment treated as application/octet-stream #657

Closed
opened 2023-10-26 17:01:44 +00:00 by Oneric · 2 comments
Member

Server setup

From source (but not my server)

Extra details

  • Fedora
  • no mediaproxy

Version

Backend: 3.10.3-204-g033b7b04-develop
Frontend: 8afbe5e

What were you trying to do?

The following post from Misskey has a single APNG attachement: https://misskey.io/notes/9l326lrrqd
The misskey API specifies "type": "image/apng" and the HTTP server providing the image treats it as content-type: image/png.
However in Pleroma API it turns into "mime_type": "application/octet-stream" which results in akkoma-fe just showing the generic placeholder file icon instead of the actual image.

Since the mimetype is already mangled in the API, I suspect this is a akkoma backend issue and not just akkoma-fe.

What did you expect to happen?

mime_type should be image/apng or image/png in API (and then afaict from a glance at its source akkoma-fe will treat and display it as an image)

Logs

(Sorry, seems like syntax highlighting and details don't work well together)

The Activity Pub object fetchable from the remote:

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    {
      "Key": "sec:Key",
      "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
      "sensitive": "as:sensitive",
      "Hashtag": "as:Hashtag",
      "quoteUrl": "as:quoteUrl",
      "toot": "http://joinmastodon.org/ns#",
      "Emoji": "toot:Emoji",
      "featured": "toot:featured",
      "discoverable": "toot:discoverable",
      "schema": "http://schema.org#",
      "PropertyValue": "schema:PropertyValue",
      "value": "schema:value",
      "misskey": "https://misskey-hub.net/ns#",
      "_misskey_content": "misskey:_misskey_content",
      "_misskey_quote": "misskey:_misskey_quote",
      "_misskey_reaction": "misskey:_misskey_reaction",
      "_misskey_votes": "misskey:_misskey_votes",
      "_misskey_summary": "misskey:_misskey_summary",
      "isCat": "misskey:isCat",
      "vcard": "http://www.w3.org/2006/vcard/ns#"
    }
  ],
  "id": "https://misskey.io/notes/9l326lrrqd",
  "type": "Note",
  "attributedTo": "https://misskey.io/users/9bp103pw0c",
  "content": "<p></p>",
  "published": "2023-10-21T03:42:51.831Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "cc": [
    "https://misskey.io/users/9bp103pw0c/followers"
  ],
  "inReplyTo": null,
  "attachment": [
    {
      "type": "Document",
      "mediaType": "image/apng",
      "url": "https://media.misskeyusercontent.com/io/2859c26e-cd43-4550-848b-b6243bc3fe28.apng",
      "name": null
    }
  ],
  "sensitive": false,
  "tag": []
}

Misskey API info about the post:

Full JSON dump

$ curl -X POST -H 'Content-Type: application/json' -d '{"noteId": "9l326lrrqd"}' https://misskey.io/api/notes/show
{
  "id": "9l326lrrqd",
  "createdAt": "2023-10-21T03:42:51.831Z",
  "userId": "9bp103pw0c",
  "user": {
    "id": "9bp103pw0c",
    "name": "Nure",
    "username": "nure500",
    "host": null,
    "avatarUrl": "https://proxy.misskeyusercontent.com/avatar.webp?url=https%3A%2F%2Fs3.arkjp.net%2Fmisskey%2Fd8980fd9-0e2c-4fd1-808d-4b71db644a9e.png&avatar=1",
    "avatarBlurhash": "eKLNlbt70Kt79Fp{j[bIa}Nd13a|ozays:00WB?bj[?aI@fkwbayxa",
    "isBot": false,
    "isCat": false,
    "emojis": {},
    "onlineStatus": "active",
    "badgeRoles": [
      {
        "name": "Misskey Supporter",
        "iconUrl": "https://s3.arkjp.net/misskey/dab4e89c-4ed1-4c06-918d-441db61dabaf.png",
        "displayOrder": 10
      }
    ]
  },
  "text": null,
  "cw": null,
  "visibility": "public",
  "localOnly": false,
  "reactionAcceptance": null,
  "renoteCount": 44,
  "repliesCount": 1,
  "reactions": {
    "❤": 12,
    ":sugoi@.:": 12,
    ":cyber_hacking@.:": 32,
    ":sugee@soukun.io:": 1,
    ":_interrobang_mark@.:": 2,
    ":ablobcatreachflip@.:": 30,
    ":kawaii@prismisskey.space:": 2,
    ":miesugite_miushinaigachi@.:": 1,
    ":glitchycat@mk.absturztau.be:": 2,
    ":kawaii_ltu@prismisskey.space:": 5,
    ":ablobcatreachflip@misskey.04.si:": 1,
    ":ablobcat_nyanpuppu_to_be_continued@mi.mashiro.site:": 1
  },
  "reactionEmojis": {
    "sugee@soukun.io": "https://files.soukun.io/files/files/68a885aa-ceb3-46a5-8269-0e9e9ef1ec92.gif",
    "kawaii@prismisskey.space": "https://files.prismisskey.space/misskey/b75b7cd7-d565-4e90-bf4f-a44a8d460ff2.png",
    "glitchycat@mk.absturztau.be": "https://mk.absturztau.be/files/fa496e10-b328-4d20-8d59-ceecfa097544",
    "kawaii_ltu@prismisskey.space": "https://files.prismisskey.space/misskey/881a0331-b047-47ea-9716-9d096ba3ef24.gif",
    "ablobcatreachflip@misskey.04.si": "https://misskey.04.si/files/06667ff4-12a2-423d-b85c-eb042d1f929e",
    "ablobcat_nyanpuppu_to_be_continued@mi.mashiro.site": "https://misskey-white.s3.amazonaws.com/misskey/9135c4bf-d53e-43b7-a175-e8655d34958f.gif"
  },
  "fileIds": [
    "9l326c3f4d"
  ],
  "files": [
    {
      "id": "9l326c3f4d",
      "createdAt": "2023-10-21T03:42:39.291Z",
      "name": "test_blobcat.blend.png.apng",
      "type": "image/apng",
      "md5": "ac2e9ae72fbe5e918fc3f4aa0cffe5b9",
      "size": 7994939,
      "isSensitive": false,
      "blurhash": "e5B4EWx@00Rk0000Rk?YkB?a00jc??ay-:_1Rk%Lt6IVIoa{ICRkt7",
      "properties": {
        "width": 600,
        "height": 600
      },
      "url": "https://media.misskeyusercontent.com/io/2859c26e-cd43-4550-848b-b6243bc3fe28.apng",
      "thumbnailUrl": "https://media.misskeyusercontent.com/io/thumbnail-aca2cebf-317e-43d0-80c1-46efeb9140c7.webp",
      "comment": null,
      "folderId": null,
      "folder": null,
      "userId": null,
      "user": null
    }
  ],
  "replyId": null,
  "renoteId": null
}

Headers from the source HTTP server for https://media.misskeyusercontent.com/io/2859c26e-cd43-4550-848b-b6243bc3fe28.apng

HTTP/2 200 
date: Thu, 26 Oct 2023 16:58:34 GMT
content-type: image/png
content-length: 7994939
cache-control: max-age=31536000, immutable
content-disposition: inline; filename="test_blobcat.blend.png.apng"
etag: "ac2e9ae72fbe5e918fc3f4aa0cffe5b9"
last-modified: Sat, 21 Oct 2023 03:42:40 GMT
vary: Accept-Encoding
cf-cache-status: HIT
age: 16346
accept-ranges: bytes
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=g3N7rC0LYvrKw82Hc5bfp4fVkcChlZJiDkxaygq
C2GKAl%2F%2FduXqdsrnQ%2B0zqDgMyJ1MTMt2iWBP0McWzXU8vVVkDPFyWozL84XGAuHBlPgW3wUorvsBe0Yr9O3gvxZQccUZhsHkqFQ%2Fjoz8WCC4w
uR7YFZUh%2BgMUbyI%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
strict-transport-security: max-age=15552000; includeSubDomains; preload
expect-ct: max-age=86400, enforce
referrer-policy: same-origin
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
server: cloudflare

Akkoma API representation of the remote post:

Full JSON dump

$ curl -q https://akko.wtf/api/v1/statuses/Ab1TuUty5NL9J2MXZo
{
  "favourited": false,
  "replies_count": 0,
  "favourites_count": 4,
  "muted": false,
  "edited_at": null,
  "id": "Ab1TuUty5NL9J2MXZo",
  "content": "",
  "poll": null,
  "media_attachments": [
    {
      "blurhash": null,
      "description": null,
      "id": "-2062853177",
      "pleroma": {
        "mime_type": "application/octet-stream"
      },
      "preview_url": "https://media.misskeyusercontent.com/io/2859c26e-cd43-4550-848b-b6243bc3fe28.apng",
      "remote_url": "https://media.misskeyusercontent.com/io/2859c26e-cd43-4550-848b-b6243bc3fe28.apng",
      "text_url": "https://media.misskeyusercontent.com/io/2859c26e-cd43-4550-848b-b6243bc3fe28.apng",
      "type": "unknown",
      "url": "https://media.misskeyusercontent.com/io/2859c26e-cd43-4550-848b-b6243bc3fe28.apng"
    }
  ],
  "pinned": false,
  "account": {
    "acct": "nure500@misskey.io",
    "akkoma": {
      "instance": {
        "favicon": "https://s3.arkjp.net/misskey/webpublic-0c66b1ca-b8c0-4eaa-9827-47674f4a1580.png",
        "name": "misskey.io",
        "nodeinfo": {
          "metadata": {
            "disableGlobalTimeline": false,
            "disableLocalTimeline": false,
            "disableRegistration": false,
            "emailRequiredForSignup": true,
            "enableEmail": true,
            "enableHcaptcha": false,
            "enableRecaptcha": false,
            "enableServiceWorker": true,
            "feedbackUrl": "https://github.com/syuilo/misskey/issues/new",
            "langs": [
              "ja",
              "en",
              "zh",
              "ko",
              "fr",
              "de"
            ],
            "maintainer": {
              "email": "https://go.misskey.io/support",
              "name": "MisskeyHQ"
            },
            "maxNoteTextLength": 3000,
            "nodeDescription": "Misskey.io は、株式会社MisskeyHQが運営する地球で生まれた分散マイクロブログSNSです。Fediverse(様々なSNSで構成される宇宙)の中に存在するため、他のSNSと相互に繋がっています。\n
\n暫し都会の喧騒から離れて、新しいインターネットにダイブしてみませんか。
\n
\n現在、新規登録時に利用できないユーザー名で登録しようとするとメール認証をした後に失敗する不具合が確認されています。お手数ですが、「始める」を押す前にユーザー名の下に「利用できます」と表示されていることをご確認ください。
\n
\nお問い合わせはこちら
https://go.misskey.io/support

\n
\n
\n© 2023 MisskeyHQ Inc.
\nPowered by Misskey
\n特定商取引法に基づく表記", "nodeName": "Misskey.io", "proxyAccountName": "ghost", "repositoryUrl": "https://github.com/syuilo/misskey", "themeColor": "#86b300", "tosUrl": "http://go.misskey.io/tos" }, "openRegistrations": true, "protocols": [ "activitypub" ], "services": { "inbound": [], "outbound": [ "atom1.0", "rss2.0" ] }, "software": { "name": "misskey", "version": "13.14.2-io.12" }, "usage": { "localComments": 0, "localPosts": 39790456, "users": { "activeHalfyear": null, "activeMonth": null, "total": 402843 } }, "version": "2.0" } }, "status_ttl_days": null }, "avatar": "https://s3.arkjp.net/misskey/d8980fd9-0e2c-4fd1-808d-4b71db644a9e.png", "avatar_static": "https://s3.arkjp.net/misskey/d8980fd9-0e2c-4fd1-808d-4b71db644a9e.png", "bot": false, "created_at": "2023-03-15T12:30:35.000Z", "display_name": "Nure", "emojis": [ { "shortcode": "nsfw", "static_url": "https://s3.arkjp.net/misskey/webpublic-f376a594-1159-42c2-b7de-8676f89d7db3.png", "url": "https://s3.arkjp.net/misskey/webpublic-f376a594-1159-42c2-b7de-8676f89d7db3.png", "visible_in_picker": false } ], "fields": [ { "name": "絵", "value": "https://misskey.io/clips/9hdihu68t6" }, { "name": "3D Blobcat GIF", "value": "https://misskey.io/clips/9cld47s4qi" }, { "name": ":vrc:", "value": "nure500" }, { "name": "もこきー(サブ)", "value": "@nure500@mkkey.net" } ], "followers_count": 0, "following_count": 0, "fqn": "nure500@misskey.io", "header": "https://media.misskeyusercontent.com/io/2869cace-b55e-4bfb-ad9c-f56522a5a051.png", "header_static": "https://media.misskeyusercontent.com/io/2869cace-b55e-4bfb-ad9c-f56522a5a051.png", "id": "ATditxr89m2yPpB5HM", "last_status_at": "2023-10-22T08:40:23", "locked": false, "note": "

イラスト練習中
メスケモを描いたりモデリングをすることがある
よく
​:nsfw:​なノートを投稿/リノートする時があるので注意

Practicing drawing
Sometimes drawing or modeling female kemono(Anthro)
【Caution】I often note/renote NSFW contents

", "pleroma": { "also_known_as": [], "ap_id": "https://misskey.io/users/9bp103pw0c", "background_image": null, "favicon": "https://s3.arkjp.net/misskey/webpublic-0c66b1ca-b8c0-4eaa-9827-47674f4a1580.png", "hide_favorites": true, "hide_followers": false, "hide_followers_count": false, "hide_follows": false, "hide_follows_count": false, "is_admin": false, "is_confirmed": true, "is_moderator": false, "is_suggested": false, "relationship": {}, "skip_thread_containment": false, "tags": [] }, "source": { "fields": [], "note": "", "pleroma": { "actor_type": "Person", "discoverable": true }, "sensitive": false }, "statuses_count": 130, "url": "https://misskey.io/@nure500", "username": "nure500" }, "reblog": null, "reblogged": false, "quote_id": null, "application": null, "emojis": [], "created_at": "2023-10-21T03:42:51.000Z", "sensitive": false, "text": null, "language": null, "mentions": [], "akkoma": { "source": { "content": "", "mediaType": "text/x.misskeymarkdown" } }, "url": "https://misskey.io/notes/9l326lrrqd", "emoji_reactions": [ { "account_ids": [ "AVjppazeSSIlQyLBLc" ], "count": 1, "me": false, "name": "ablobcatreachflip@s3.arkjp.net", "url": "https://s3.arkjp.net/emoji/ablobcatreachflip.apng" }, { "account_ids": [ "AMCvWrrI4mylXY9Yzw" ], "count": 1, "me": false, "name": "glitchycat@mk.absturztau.be", "url": "https://mk.absturztau.be/files/fa496e10-b328-4d20-8d59-ceecfa097544" } ], "card": null, "in_reply_to_account_id": null, "in_reply_to_id": null, "pleroma": { "content": { "text/plain": "" }, "context": "https://misskey.io/notes/9l326lrrqd", "conversation_id": 1809484596, "direct_conversation_id": null, "emoji_reactions": [ { "account_ids": [ "AVjppazeSSIlQyLBLc" ], "count": 1, "me": false, "name": "ablobcatreachflip@s3.arkjp.net", "url": "https://s3.arkjp.net/emoji/ablobcatreachflip.apng" }, { "account_ids": [ "AMCvWrrI4mylXY9Yzw" ], "count": 1, "me": false, "name": "glitchycat@mk.absturztau.be", "url": "https://mk.absturztau.be/files/fa496e10-b328-4d20-8d59-ceecfa097544" } ], "expires_at": null, "in_reply_to_account_acct": null, "local": false, "parent_visible": false, "pinned_at": null, "spoiler_text": { "text/plain": "" }, "thread_muted": false }, "uri": "https://misskey.io/notes/9l326lrrqd", "tags": [], "spoiler_text": "", "quote": null, "reblogs_count": 13, "bookmarked": false, "visibility": "unlisted" }

Severity

I can manage

Have you searched for this issue?

  • I have double-checked and have not found this issue mentioned anywhere.
### Server setup From source (but not my server) ### Extra details - Fedora - no mediaproxy ### Version Backend: 3.10.3-204-g033b7b04-develop Frontend: 8afbe5e ### What were you trying to do? The following post from Misskey has a single APNG attachement: https://misskey.io/notes/9l326lrrqd The misskey API specifies `"type": "image/apng"` and the HTTP server providing the image treats it as `content-type: image/png`. However in Pleroma API it turns into `"mime_type": "application/octet-stream"` which results in akkoma-fe just showing the generic placeholder file icon instead of the actual image. Since the mimetype is already mangled in the API, I suspect this is a akkoma backend issue and not just akkoma-fe. ### What did you expect to happen? `mime_type` should be `image/apng` or `image/png` in API *(and then afaict from a glance at its source akkoma-fe will treat and display it as an image)* ### Logs *(Sorry, seems like syntax highlighting and details don't work well together)* The Activity Pub object fetchable from the remote: ```json { "@context": [ "https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1", { "Key": "sec:Key", "manuallyApprovesFollowers": "as:manuallyApprovesFollowers", "sensitive": "as:sensitive", "Hashtag": "as:Hashtag", "quoteUrl": "as:quoteUrl", "toot": "http://joinmastodon.org/ns#", "Emoji": "toot:Emoji", "featured": "toot:featured", "discoverable": "toot:discoverable", "schema": "http://schema.org#", "PropertyValue": "schema:PropertyValue", "value": "schema:value", "misskey": "https://misskey-hub.net/ns#", "_misskey_content": "misskey:_misskey_content", "_misskey_quote": "misskey:_misskey_quote", "_misskey_reaction": "misskey:_misskey_reaction", "_misskey_votes": "misskey:_misskey_votes", "_misskey_summary": "misskey:_misskey_summary", "isCat": "misskey:isCat", "vcard": "http://www.w3.org/2006/vcard/ns#" } ], "id": "https://misskey.io/notes/9l326lrrqd", "type": "Note", "attributedTo": "https://misskey.io/users/9bp103pw0c", "content": "<p></p>", "published": "2023-10-21T03:42:51.831Z", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "cc": [ "https://misskey.io/users/9bp103pw0c/followers" ], "inReplyTo": null, "attachment": [ { "type": "Document", "mediaType": "image/apng", "url": "https://media.misskeyusercontent.com/io/2859c26e-cd43-4550-848b-b6243bc3fe28.apng", "name": null } ], "sensitive": false, "tag": [] } ``` Misskey API info about the post: <details> <summary>Full JSON dump</summary> <pre class="code-block"> <code class="chroma language-json"> $ curl -X POST -H 'Content-Type: application/json' -d '{"noteId": "9l326lrrqd"}' https://misskey.io/api/notes/show { "id": "9l326lrrqd", "createdAt": "2023-10-21T03:42:51.831Z", "userId": "9bp103pw0c", "user": { "id": "9bp103pw0c", "name": "Nure", "username": "nure500", "host": null, "avatarUrl": "https://proxy.misskeyusercontent.com/avatar.webp?url=https%3A%2F%2Fs3.arkjp.net%2Fmisskey%2Fd8980fd9-0e2c-4fd1-808d-4b71db644a9e.png&avatar=1", "avatarBlurhash": "eKLNlbt70Kt79Fp{j[bIa}Nd13a|ozays:00WB?bj[?aI@fkwbayxa", "isBot": false, "isCat": false, "emojis": {}, "onlineStatus": "active", "badgeRoles": [ { "name": "Misskey Supporter", "iconUrl": "https://s3.arkjp.net/misskey/dab4e89c-4ed1-4c06-918d-441db61dabaf.png", "displayOrder": 10 } ] }, "text": null, "cw": null, "visibility": "public", "localOnly": false, "reactionAcceptance": null, "renoteCount": 44, "repliesCount": 1, "reactions": { "❤": 12, ":sugoi@.:": 12, ":cyber_hacking@.:": 32, ":sugee@soukun.io:": 1, ":_interrobang_mark@.:": 2, ":ablobcatreachflip@.:": 30, ":kawaii@prismisskey.space:": 2, ":miesugite_miushinaigachi@.:": 1, ":glitchycat@mk.absturztau.be:": 2, ":kawaii_ltu@prismisskey.space:": 5, ":ablobcatreachflip@misskey.04.si:": 1, ":ablobcat_nyanpuppu_to_be_continued@mi.mashiro.site:": 1 }, "reactionEmojis": { "sugee@soukun.io": "https://files.soukun.io/files/files/68a885aa-ceb3-46a5-8269-0e9e9ef1ec92.gif", "kawaii@prismisskey.space": "https://files.prismisskey.space/misskey/b75b7cd7-d565-4e90-bf4f-a44a8d460ff2.png", "glitchycat@mk.absturztau.be": "https://mk.absturztau.be/files/fa496e10-b328-4d20-8d59-ceecfa097544", "kawaii_ltu@prismisskey.space": "https://files.prismisskey.space/misskey/881a0331-b047-47ea-9716-9d096ba3ef24.gif", "ablobcatreachflip@misskey.04.si": "https://misskey.04.si/files/06667ff4-12a2-423d-b85c-eb042d1f929e", "ablobcat_nyanpuppu_to_be_continued@mi.mashiro.site": "https://misskey-white.s3.amazonaws.com/misskey/9135c4bf-d53e-43b7-a175-e8655d34958f.gif" }, "fileIds": [ "9l326c3f4d" ], "files": [ { "id": "9l326c3f4d", "createdAt": "2023-10-21T03:42:39.291Z", "name": "test_blobcat.blend.png.apng", "type": "image/apng", "md5": "ac2e9ae72fbe5e918fc3f4aa0cffe5b9", "size": 7994939, "isSensitive": false, "blurhash": "e5B4EWx@00Rk0000Rk?YkB?a00jc??ay-:_1Rk%Lt6IVIoa{ICRkt7", "properties": { "width": 600, "height": 600 }, "url": "https://media.misskeyusercontent.com/io/2859c26e-cd43-4550-848b-b6243bc3fe28.apng", "thumbnailUrl": "https://media.misskeyusercontent.com/io/thumbnail-aca2cebf-317e-43d0-80c1-46efeb9140c7.webp", "comment": null, "folderId": null, "folder": null, "userId": null, "user": null } ], "replyId": null, "renoteId": null } </code> </pre> </details> Headers from the source HTTP server for https://media.misskeyusercontent.com/io/2859c26e-cd43-4550-848b-b6243bc3fe28.apng ``` HTTP/2 200 date: Thu, 26 Oct 2023 16:58:34 GMT content-type: image/png content-length: 7994939 cache-control: max-age=31536000, immutable content-disposition: inline; filename="test_blobcat.blend.png.apng" etag: "ac2e9ae72fbe5e918fc3f4aa0cffe5b9" last-modified: Sat, 21 Oct 2023 03:42:40 GMT vary: Accept-Encoding cf-cache-status: HIT age: 16346 accept-ranges: bytes report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=g3N7rC0LYvrKw82Hc5bfp4fVkcChlZJiDkxaygq C2GKAl%2F%2FduXqdsrnQ%2B0zqDgMyJ1MTMt2iWBP0McWzXU8vVVkDPFyWozL84XGAuHBlPgW3wUorvsBe0Yr9O3gvxZQccUZhsHkqFQ%2Fjoz8WCC4w uR7YFZUh%2BgMUbyI%3D"}],"group":"cf-nel","max_age":604800} nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800} strict-transport-security: max-age=15552000; includeSubDomains; preload expect-ct: max-age=86400, enforce referrer-policy: same-origin x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-xss-protection: 1; mode=block server: cloudflare ``` Akkoma API representation of the remote post: <details> <summary>Full JSON dump</summary> <pre class=code-blcok"> <code class="chroma language-json"> $ curl -q https://akko.wtf/api/v1/statuses/Ab1TuUty5NL9J2MXZo { "favourited": false, "replies_count": 0, "favourites_count": 4, "muted": false, "edited_at": null, "id": "Ab1TuUty5NL9J2MXZo", "content": "", "poll": null, "media_attachments": [ { "blurhash": null, "description": null, "id": "-2062853177", "pleroma": { "mime_type": "application/octet-stream" }, "preview_url": "https://media.misskeyusercontent.com/io/2859c26e-cd43-4550-848b-b6243bc3fe28.apng", "remote_url": "https://media.misskeyusercontent.com/io/2859c26e-cd43-4550-848b-b6243bc3fe28.apng", "text_url": "https://media.misskeyusercontent.com/io/2859c26e-cd43-4550-848b-b6243bc3fe28.apng", "type": "unknown", "url": "https://media.misskeyusercontent.com/io/2859c26e-cd43-4550-848b-b6243bc3fe28.apng" } ], "pinned": false, "account": { "acct": "nure500@misskey.io", "akkoma": { "instance": { "favicon": "https://s3.arkjp.net/misskey/webpublic-0c66b1ca-b8c0-4eaa-9827-47674f4a1580.png", "name": "misskey.io", "nodeinfo": { "metadata": { "disableGlobalTimeline": false, "disableLocalTimeline": false, "disableRegistration": false, "emailRequiredForSignup": true, "enableEmail": true, "enableHcaptcha": false, "enableRecaptcha": false, "enableServiceWorker": true, "feedbackUrl": "https://github.com/syuilo/misskey/issues/new", "langs": [ "ja", "en", "zh", "ko", "fr", "de" ], "maintainer": { "email": "https://go.misskey.io/support", "name": "MisskeyHQ" }, "maxNoteTextLength": 3000, "nodeDescription": "Misskey.io は、株式会社MisskeyHQが運営する地球で生まれた分散マイクロブログSNSです。Fediverse(様々なSNSで構成される宇宙)の中に存在するため、他のSNSと相互に繋がっています。\n<br>\n暫し都会の喧騒から離れて、新しいインターネットにダイブしてみませんか。<br>\n<br>\n<strong>現在、新規登録時に利用できないユーザー名で登録しようとするとメール認証をした後に失敗する不具合が確認されています。お手数ですが、「始める」を押す前にユーザー名の下に「利用できます」と表示されていることをご確認ください。</strong><br>\n<br>\n<a href=\"https://go.misskey.io/support\" target=\"_blank\">お問い合わせはこちら<br>https://go.misskey.io/support</a><br>\n<br>\n<br>\n&copy; 2023 MisskeyHQ Inc.<br>\nPowered by Misskey<br>\n<a href=\"https://support.misskey.io/hc/ja/articles/7767990164111\" target=\"_blank\">特定商取引法に基づく表記</a>", "nodeName": "Misskey.io", "proxyAccountName": "ghost", "repositoryUrl": "https://github.com/syuilo/misskey", "themeColor": "#86b300", "tosUrl": "http://go.misskey.io/tos" }, "openRegistrations": true, "protocols": [ "activitypub" ], "services": { "inbound": [], "outbound": [ "atom1.0", "rss2.0" ] }, "software": { "name": "misskey", "version": "13.14.2-io.12" }, "usage": { "localComments": 0, "localPosts": 39790456, "users": { "activeHalfyear": null, "activeMonth": null, "total": 402843 } }, "version": "2.0" } }, "status_ttl_days": null }, "avatar": "https://s3.arkjp.net/misskey/d8980fd9-0e2c-4fd1-808d-4b71db644a9e.png", "avatar_static": "https://s3.arkjp.net/misskey/d8980fd9-0e2c-4fd1-808d-4b71db644a9e.png", "bot": false, "created_at": "2023-03-15T12:30:35.000Z", "display_name": "Nure", "emojis": [ { "shortcode": "nsfw", "static_url": "https://s3.arkjp.net/misskey/webpublic-f376a594-1159-42c2-b7de-8676f89d7db3.png", "url": "https://s3.arkjp.net/misskey/webpublic-f376a594-1159-42c2-b7de-8676f89d7db3.png", "visible_in_picker": false } ], "fields": [ { "name": "絵", "value": "<a href=\"https://misskey.io/clips/9hdihu68t6\">https://misskey.io/clips/9hdihu68t6</a>" }, { "name": "3D Blobcat GIF", "value": "<a href=\"https://misskey.io/clips/9cld47s4qi\">https://misskey.io/clips/9cld47s4qi</a>" }, { "name": ":vrc:", "value": "nure500" }, { "name": "もこきー(サブ)", "value": "@nure500@mkkey.net" } ], "followers_count": 0, "following_count": 0, "fqn": "nure500@misskey.io", "header": "https://media.misskeyusercontent.com/io/2869cace-b55e-4bfb-ad9c-f56522a5a051.png", "header_static": "https://media.misskeyusercontent.com/io/2869cace-b55e-4bfb-ad9c-f56522a5a051.png", "id": "ATditxr89m2yPpB5HM", "last_status_at": "2023-10-22T08:40:23", "locked": false, "note": "<p><span>イラスト練習中<br/>メスケモを描いたりモデリングをすることがある<br/>よく</span>​:nsfw:​<span>なノートを投稿/リノートする時があるので注意<br/><br/>Practicing drawing<br/>Sometimes drawing or modeling female kemono(Anthro)<br/>【Caution】I often note/renote NSFW contents</span></p>", "pleroma": { "also_known_as": [], "ap_id": "https://misskey.io/users/9bp103pw0c", "background_image": null, "favicon": "https://s3.arkjp.net/misskey/webpublic-0c66b1ca-b8c0-4eaa-9827-47674f4a1580.png", "hide_favorites": true, "hide_followers": false, "hide_followers_count": false, "hide_follows": false, "hide_follows_count": false, "is_admin": false, "is_confirmed": true, "is_moderator": false, "is_suggested": false, "relationship": {}, "skip_thread_containment": false, "tags": [] }, "source": { "fields": [], "note": "", "pleroma": { "actor_type": "Person", "discoverable": true }, "sensitive": false }, "statuses_count": 130, "url": "https://misskey.io/@nure500", "username": "nure500" }, "reblog": null, "reblogged": false, "quote_id": null, "application": null, "emojis": [], "created_at": "2023-10-21T03:42:51.000Z", "sensitive": false, "text": null, "language": null, "mentions": [], "akkoma": { "source": { "content": "", "mediaType": "text/x.misskeymarkdown" } }, "url": "https://misskey.io/notes/9l326lrrqd", "emoji_reactions": [ { "account_ids": [ "AVjppazeSSIlQyLBLc" ], "count": 1, "me": false, "name": "ablobcatreachflip@s3.arkjp.net", "url": "https://s3.arkjp.net/emoji/ablobcatreachflip.apng" }, { "account_ids": [ "AMCvWrrI4mylXY9Yzw" ], "count": 1, "me": false, "name": "glitchycat@mk.absturztau.be", "url": "https://mk.absturztau.be/files/fa496e10-b328-4d20-8d59-ceecfa097544" } ], "card": null, "in_reply_to_account_id": null, "in_reply_to_id": null, "pleroma": { "content": { "text/plain": "" }, "context": "https://misskey.io/notes/9l326lrrqd", "conversation_id": 1809484596, "direct_conversation_id": null, "emoji_reactions": [ { "account_ids": [ "AVjppazeSSIlQyLBLc" ], "count": 1, "me": false, "name": "ablobcatreachflip@s3.arkjp.net", "url": "https://s3.arkjp.net/emoji/ablobcatreachflip.apng" }, { "account_ids": [ "AMCvWrrI4mylXY9Yzw" ], "count": 1, "me": false, "name": "glitchycat@mk.absturztau.be", "url": "https://mk.absturztau.be/files/fa496e10-b328-4d20-8d59-ceecfa097544" } ], "expires_at": null, "in_reply_to_account_acct": null, "local": false, "parent_visible": false, "pinned_at": null, "spoiler_text": { "text/plain": "" }, "thread_muted": false }, "uri": "https://misskey.io/notes/9l326lrrqd", "tags": [], "spoiler_text": "", "quote": null, "reblogs_count": 13, "bookmarked": false, "visibility": "unlisted" } </code> </pre> </details> ### Severity I can manage ### Have you searched for this issue? - [x] I have double-checked and have not found this issue mentioned anywhere.
Oneric added the
bug
label 2023-10-26 17:01:44 +00:00
Oneric changed title from APNG attachment treated as application/octet-stream to Remote APNG attachment treated as application/octet-stream 2023-10-26 17:04:03 +00:00
Author
Member

I believe, I identified the issue: in both the object attachment validator and the transmogrifier Akkoma uses checks to the effect of MIME.extensions(attach["mediaType"]) != [] and if that fails strips it or replaces it with application/octet-stream. Presumably this is done to ensure it’s a valid MIME type.
Since mime does currently not know about image/apng (but it is properly assigned by IANA), we’ll end up with an octet-stream.

Sent a fix to upstream, once it’s merged (and the next release tagged), we can upgrade the dep in Akkoma and the problem should be resolved.
.. but here’s the funny bit: eventhough Akkoma directly uses MIME. in several places, it is not declared as a dependency. (It still ends up being pulled in as a transitive dep though.) So this will need to be fixed then too.

The last release without APNG is 2.0.5

Update: the addition is already merged; that was quick ^^

I believe, I identified the issue: in both the object attachment validator and the transmogrifier Akkoma uses checks to the effect of `MIME.extensions(attach["mediaType"]) != []` and if that fails strips it or replaces it with `application/octet-stream`. Presumably this is done to ensure it’s a valid MIME type. Since mime does currently not know about `image/apng` *(but it is properly assigned by IANA)*, we’ll end up with an octet-stream. Sent a fix to upstream, once it’s merged (and the next release tagged), we can upgrade the dep in Akkoma and the problem _should_ be resolved. .. but here’s the funny bit: eventhough Akkoma directly uses `MIME.` in several places, it is not declared as a dependency. *(It still ends up being pulled in as a transitive dep though.)* So this will need to be fixed then too. The last release without APNG is `2.0.5` **Update:** the addition is already merged; that was quick ^^
Author
Member

fixed in 31f90bbb52

fixed in 31f90bbb52db472f45d38aa90fc1bae43b65d7ff
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma#657
No description provided.