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

Mask OTR messages #77

Open
sebastianriese opened this issue Mar 9, 2018 · 3 comments
Open

Mask OTR messages #77

sebastianriese opened this issue Mar 9, 2018 · 3 comments

Comments

@sebastianriese
Copy link
Contributor

When we receive Carbons for OTR messages sent by another client we should probably not show the body (since this is just base64-mumble jumble), and perhaps show some useful information.

@horazont
Copy link
Contributor

Ideally, I’d like to drop them right away. The problem is that we’d have to do that very deep in the layers to avoid a conversation to even get spawned (otherwise, you’d end up with an empty conversation window).

Not sure if that’s worth it. It might be.

@sebastianriese
Copy link
Contributor Author

sebastianriese commented Mar 10, 2018

Dropping them entirely and early sounds wrong to me, as this masks the communication attempt itself, and so might lead to unnecessary loss, when the other client is just misbehaving (e.g. using a lingering OTR session with another resource). Something like an "OTR communication attempt" marker, whose timestamp is updated seems better to me (then you can answer without OTR, if you are not communicating with another resource at the moment, the other side will see this as something like "unencrypted message from: ..." and may turn off the OTR, depending on the secrecy of the conent). (Also, how intricate should the check for OTR be to prevent false positives).

@horazont
Copy link
Contributor

horazont commented Mar 10, 2018

Okay, we need something more magic here. I also think that we might want the "hidden conversation" concept I wish poezio had (more on that later).

We should monitor OTR traffic more deeply.

  • If a new conversation is started due to an inbound OTR handshake, the conversation is hidden at first. If other resources of the account are online, we send a XEP-0199 ping to them. If no resource has replied to the OTR handshake until after we received all pongs (modulo timeout), we un-hide the conversation and show the pseudo-message (it’s not a "marker", see below) you suggested. Otherwise, the conversation stays hidden and OTR messages are replaced by some marker like "Unreadable encrypted conversation with another device.".

  • If an existing conversation receives an OTR handshake, we put a pseudo message in there saying that the peer attempted encrypted communication with an unsupported protocol (OTR).

"Hidden conversation": A conversation for which we keep an aioxmpp.im.AbstractConversation object, but which we don’t show in the conversations view. We only show it when a message arrives which triggers a notification for that conversation. This is super convenient to idle in MUCs: doesn’t cost space in the list, but you still get notifies for trigger words.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants