fix: query bare JID for PEP features during discovery#2176
Merged
Conversation
XEP-0163 (Personal Eventing Protocol) states that service discovery information queries regarding PEP capabilities must be sent to the users bare JID in order to determine support. Profanity only queried the server domain JID and its generic disco#items on connect, but never queried the users own bare JID. Because ejabberd advertises PEP and PubSub features on both the server JID and the bare JID this bug was kind of invisible. However, Prosody strictly advertises PEP capabilities only on the users bare JID. This discovery failure became a hard blocker for OMEMO on Prosody servers following commit 01c781f ("Don't publish keys if the server doesn't support pubsub."), which turned the check for publish-options into an early-return condition. We now query our own bare JID during feature discovery on connect and insert it into conn.features_by_jid. See-also: https://xmpp.org/extensions/xep-0163.html Ref: 01c781f Signed-off-by: Michael Vetter <jubalh@iodoru.org>
Contributor
|
I don't see anymore pubsub errors. OMEMO works, but it also did before. |
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.
XEP-0163 (Personal Eventing Protocol) states that service discovery information queries regarding PEP capabilities must be sent to the users bare JID in order to determine support.
Profanity only queried the server domain JID and its generic disco#items on connect, but never queried the users own bare JID.
Because ejabberd advertises PEP and PubSub features on both the server JID and the bare JID this bug was kind of invisible. However, Prosody strictly advertises PEP capabilities only on the users bare JID.
This discovery failure became a hard blocker for OMEMO on Prosody servers following commit 01c781f ("Don't publish keys if the server doesn't support pubsub."), which turned the check for publish-options into an early-return condition.
We now query our own bare JID during feature discovery on connect and insert it into conn.features_by_jid.
See-also: https://xmpp.org/extensions/xep-0163.html
Ref: 01c781f