Conversation
`cb_is_logged_in()` incorrectly returned `PRESENCE_ONLINE` for contacts not in the roster or without a presence subscription. According to libotr API documentation, returning 1 informs the library that it is safe to send automated background traffic (heartbeats or handshake responses). Because of this, when spammers sent an initial OTR query (`?OTR?v23?`), we would automatically inject a handshake response, confirming the users network availability. This violates XMPP Presence Privacy best practices defined in RFC 6121 Section 4.1, which states that presence information must not be revealed to entities without explicit authorization. Fixes: #2166 Signed-off-by: Michael Vetter <jubalh@iodoru.org>
Don't automatically end an OTR session when a contact disconnects. Now we have clearer separation: `chatwin->is_otr` tracks whether the user wants to use OTR. `otr_is_secure` tracks whether the encryption is still activated. We can now use this when sending a message to make sure we don't send unencrypted text in case the contact goes offline. We will display a hint that the user first needs to stop to use otr by disabling it (`/otr end`). This as well improves the situation when the connection flickers (contact goes offline/online). Fixes: #952 Signed-off-by: Michael Vetter <jubalh@iodoru.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Don't automatically end an OTR session when a contact disconnects.
Now we have clearer separation:
chatwin->is_otrtracks whether the user wants to use OTR.otr_is_securetracks whether the encryption is still activated.We can now use this when sending a message to make sure we don't send
unencrypted text in case the contact goes offline.
We will display a hint that the user first needs to stop to use otr by
disabling it (
/otr end).This as well improves the situation when the connection flickers
(contact goes offline/online).
Fixes: #952