element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.02k stars 1.96k forks source link

Decrypting a video file in a room shows binary text preview instead of media #15099

Closed anoadragon453 closed 2 years ago

anoadragon453 commented 4 years ago

Description

image

I got sent a video. It appeared as "Decrypt videoname...". I clicked Decrypt, and ended up with a scrollable view of binary text instead.

The event's source is:

{
  "room_id": "!redacted:domain.com",
  "type": "m.room.message",
  "content": {
    "body": "VIDEO-2020-09-04-09-03-54.mp4",
    "info": {
      "mimetype": "video/mp4",
      "size": 3701661
    },
    "file": {
      "iv": "5lk9NKrrURcAAAAAAAAAAA==",
      "mimetype": "video/mp4",
      "key": {
        "k": "2s34QaKLgTxphH6d5xlHsqDJOc_6GIWNqvytJXUBUac",
        "ext": true,
        "key_ops": [
          "encrypt",
          "decrypt"
        ],
        "alg": "A256CTR",
        "kty": "oct"
      },
      "hashes": {
        "sha256": "Qm7UaOgabwvLZ7KKXVgBt369dO5O+6flrL9yMGXhh2U"
      },
      "url": "mxc://redacted",
      "v": "v2"
    },
    "msgtype": "m.file"
  }
}

Logs being sent: yes

Version information

anoadragon453 commented 4 years ago

Quitting and reopening Element did fix the issue, and I did update Element using my package manager since it had been opened.

jryans commented 4 years ago

Hmm, that's quite a strange one. 😕 I guess let us know if it happens again.

anoadragon453 commented 3 years ago

It has happened again. I tried clicking Decrypt, got the binary garbled text, went to a different room, came back, same thing.

Only a few minutes later when I went to reproduce again before submitting debug logs did it suddenly work. Very weird...

jryans commented 3 years ago

I do find it curious that this seems to only affect @anoadragon453... 🤔

anoadragon453 commented 2 years ago

I haven't seen this in at least a year, so let's close it. If someone sees the same, please file a new issue.