Skip to content

fix(otr): prevent OTR handshake from leaking presence to strangers#2168

Merged
jubalh merged 1 commit into
masterfrom
fix/otrl
May 20, 2026
Merged

fix(otr): prevent OTR handshake from leaking presence to strangers#2168
jubalh merged 1 commit into
masterfrom
fix/otrl

Conversation

@jubalh

@jubalh jubalh commented May 19, 2026

Copy link
Copy Markdown
Member

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

`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>
@jubalh jubalh added this to the next milestone May 19, 2026
@jubalh jubalh self-assigned this May 19, 2026
@jubalh jubalh merged commit cf90e20 into master May 20, 2026
12 checks passed
@jubalh

jubalh commented May 20, 2026

Copy link
Copy Markdown
Member Author

See #2166 (comment)

@jubalh jubalh deleted the fix/otrl branch May 20, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant