-
-
Notifications
You must be signed in to change notification settings - Fork 98
secure-join timeout is not useful for chatmail #6706
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
Comments
I'm in favor of fix 2. or 3. Edit: I tend a bit towards fix 3, removing the timeout altogether. In DC-DC usage it's usually not useful because mostly, both sides will use Chatmail. In DC->Email usage it's not useful because there are no QR codes you can scan there. The only case where it's useful is when Alice uses DC with a classical account (or a self-hosted chatmail account where she is able to send messages), and Bob also uses DC, and the securejoin messages are delayed a lot or don't arrive at all (in which case the messaging experience isn't going to be great, anyway - and Alice is going to have a bad time when she notices that she can't add Bob to verified groups). And getting rid of complexity is always great. |
On Thu, Mar 27, 2025 at 06:34 -0700, Hocuri wrote:
Hocuri left a comment (chatmail/core#6706)
I'm in favor of fix 2. or 3.
I am for 3. (wait indefinitely) plus changed wording that indicates
that this will only finish when the other side gets online.
Have a deterministic result of securejoin-tapping indeed
helps to avoid the "it's encrypted except ..." problem.
|
If we remove timeout, users will still be able to send unencrypted message. For setup contact protocol (not joining the group), 1:1 chat is created immediately but is blocked for 15 seconds by |
my idea is to
for the mentioned "forever blocking when showing wrong qr code for an address" (however this can happen): shouldn't a new scan remove the old, blocked process? |
We have multiple Bob processes now and old processes are not removed if they still have a chance to finish. Starting a new process with a working QR code will result in encrypted chat. The only problem is that if you don't have a working QR code (e.g. because the address does not use DC anymore) you can no longer send unencrypted message. Receiving an unencrypted message from this address should fix the problem I think. On desktop we have a "reset encryption" button in the encryption info as well, it should help in resolving this if you really want to drop to unencrypted. |
i can confirm, this works as expected with the PR #6722 - if Bob scans a bad QR code of Alice, things are stuck, but when Bob scans later a working one, things are fine
so, this is a situation that is interesting only for non-chatmail, right? |
Revert the biggest part of #6722 in order to fix #6816. Reopens #6706. Rationale for reverting instead of fixing is that it's not trivial to implement "if the chat is encrypted, can_send() returns true": When sending a message, in order to check whether to encrypt, we load all peerstates and check whether all of them can be encrypted to (`should_encrypt()`). We could do this in `can_send()`, but this would make it quite slow for groups. With multi-transport, the ways of checking whether to encrypt will be different, so in order not to do unnecessary work now, this PR just revert parts of [https://github.com/chatmail/core/pull/6722/](https://github.com/chatmail/core/pull/6817#), so that we can make things work nicely when multi-transport is merged. As a quick mitigation, we could increase the timeout from 15s to something like 1 minute or 1 day: Long enough that usually securejoin will finish before, but short enough that it's possible to send to old chats that had a failed securejoin long in the past.
Reopening because #6817 reverted the fix |
when scanning a QR code, the chat does not allow to send messages, as they cannot be encrypted yet.
however, if the other side does not respond within 15 seconds (grep for
SECUREJOIN_WAIT_TIMEOUT
), a message is added to the chat, saying that you can already send a message, even though e2ee is not established yet:the reason for the timeout being introduced that time was to not let ppl send accidentally an unencrypted message (doing a qr code scan and sending the message a second before e2ee is established)
with chatmail, however, things have changed, as sending unencrypted messages is not possible at all.
possible fixes:
for reference: the timeout was introduced at #5512 / #5550
The text was updated successfully, but these errors were encountered: