element-hq / element-web

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

Forwarding media sends the encrypted media into unencrypted rooms #23298

Open deepbluev7 opened 2 years ago

deepbluev7 commented 2 years ago

Steps to reproduce

  1. Upload an image into an encrypted room
  2. Forward it into an unencrypted room

Outcome

What did you expect?

The image should be sent as if I sent it into the unencrypted room in the first place.

What happened instead?

It is sent as an encrypted attachment. This means several clients can't or will refuse to decrypt the image. It also breaks bots and if you are trying to get around broken E2EE or someone not having E2EE, this is not possible using forwards because of this.

Operating system

Any

Browser information

Any

URL for webapp

app.element.io

Application version

1.11.5

Homeserver

any

Will you send logs?

No

t3chguy commented 2 years ago

This was chosen deliberately to avoid having to download & re-upload the media, potentially consuming significant bandwidth

deepbluev7 commented 2 years ago

You can still reuse the media when going unencrypted -> unencrypted, unencrypted -> encrypted and encrypted->encrypted. It however breaks other clients when going encrypted->unencrypted, especially if they don't support encryption yet. It is also very surprising for people why stuff like the TWIM bot doesn't work with forwarded images (since they usually don't even know about this limitation).