matrix-org / matrix-appservice-irc

Node.js IRC bridge for Matrix
Apache License 2.0
460 stars 151 forks source link

"encrypted" images in public rooms are not sent to IRC #1648

Open progval opened 1 year ago

progval commented 1 year ago

A message sent earlier today in #libera-matrix:matrix.org:

{
  "content": {
    "body": "image.png",
    "file": {
      "hashes": {
        "sha256": "hkh8tNYE7vSAXhfx0x+4b50NalACvL1FvjTwelXtXbA"
      },
      "iv": "F2W9eU5ULFsAAAAAAAAAAA",
      "key": {
        "alg": "A256CTR",
        "ext": true,
        "k": "BjLEsY1MVwOgjYLqYqCoh07ZfUBFMhMXRVijSm2bETs",
        "key_ops": [
          "encrypt",
          "decrypt"
        ],
        "kty": "oct"
      },
      "url": "mxc://matrix.org/NnNRMNCsbUPeXNDvAyuLkGGL",
      "v": "v2"
    },
    "info": {
      "h": 411,
      "mimetype": "image/png",
      "size": 48552,
      "w": 688,
      "xyz.amorgan.blurhash": "L26a^#$o_0w*m;y8a8-.D~VxtPRQ"
    },
    "msgtype": "m.image"
  },
  "origin_server_ts": 1668453026291,
  "sender": "@lukas.discrust:matrix.org",
  "type": "m.room.message",
  "unsigned": {
    "age": 938
  },
  "event_id": "$-vyBHiK_W-Hz7h3ejMeb8TV5GkAa4HWB_MfQlOu2Iyo",
  "room_id": "!vjOdckstTLwMkKHIgz:libera.chat"
}

which sent this to IRC:

19:10:26  * discrust[m] uploaded an image: image.png
Mikaela commented 1 year ago

This seems to be a regression from 2020 https://github.com/matrix-org/matrix-appservice-irc/issues/720#issuecomment-581455024

Half-Shot commented 1 year ago

We basically need to ignore these kinds of events for now, as there isn't a way we can show them in a browser directly, since they are encrypted blobs.