Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First message in a DM was not encrypted #28094

Open
andybalaam opened this issue Sep 24, 2024 · 2 comments
Open

First message in a DM was not encrypted #28094

andybalaam opened this issue Sep 24, 2024 · 2 comments
Labels
A-DM-Start Creating a DM with another user A-E2EE O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect

Comments

@andybalaam
Copy link
Contributor

Steps to reproduce

  1. Start new chat
  2. Type mxid of other person, click Go
  3. Type a message to the other person

Outcome

What did you expect?

I expected all messages in this DM to be encrypted.

What happened instead?

The first message was not encrypted:

image

Source of that first event:

{
  "content": {
    "body": "Hi, thank you for looking at MSC3757, and sorry I have neglected it!",
    "m.mentions": {},
    "msgtype": "m.text"
  },
  "origin_server_ts": 1727188841453,
  "sender": "@andybalaam:matrix.org",
  "type": "m.room.message",
  "unsigned": {
    "membership": "join",
    "age": 12541,
    "transaction_id": "m1727188841284.81"
  },
  "event_id": "$RX_kUJTWDQL3DVE1fRkx2foUYt73DXpyaMlHRA73TXU",
  "room_id": "!qKSwlzySCzuQreJffe:matrix.org"
}

Later messages in this DM were encrypted as expected.

Operating system

Debian 12.7

Browser information

Firefox 130.0

URL for webapp

https://develop.element.io

Application version

Element version: 787feca-react-a1bdceed3e54-js-f8208b18916d Crypto version: Rust SDK 0.7.2 (7a21514), Vodozemac 0.7.0

Homeserver

matrix.org

Will you send logs?

Yes

@dosubot dosubot bot added A-DM-Start Creating a DM with another user A-E2EE O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Major Severely degrades major functionality or product features, with no satisfactory workaround labels Sep 24, 2024
@kegsay
Copy link
Contributor

kegsay commented Sep 24, 2024

This could be due to the same race condition I outlined in my UTD talk - if we only latch encryption on if we see the m.room.encrpytion state event, then what happens if you try to send a message before the client is notified about that event via /sync?

@BillCarsonFr
Copy link
Member

I recently had a similar problem of EW sending in clear but with a local setup, I sent a RS https://github.com/element-hq/element-web-rageshakes/issues/27122
As far as I remember it was not a fresh DM. Maybe not related as it was a local setup running local code. But yet adding here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-DM-Start Creating a DM with another user A-E2EE O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Projects
None yet
Development

No branches or pull requests

3 participants