fix(omemo): bootstrap device list on prosody servers (#169) #171
Open
jabber.developer2
wants to merge 1 commits from
fix/omemo-prosody-bootstrap into master
pull from: fix/omemo-prosody-bootstrap
merge into: devs:master
devs:master
devs:fix/untrusted-input-148
devs:fix/e2ee-transport-147
devs:feat/cons-show-warning-87
devs:fix/disco-info-null-from
devs:fix/editor-terminal-size
devs:fix/data-at-rest-hardening
devs:feat/ai-api-type
devs:ci/docker-hub-publishing
devs:feat/disco-ac
devs:feat/privacy-enhancements
devs:fix/clientid-regression
devs:fix/ai-chat-completions-followup
devs:feat/ai-custom
devs:fix/unencrypted-send
devs:rollback/pre-upstream-merge
devs:fix/autoping-warning-null-domain
devs:fix/pad-dead-space-reclaim
devs:feat/autoping-warning
devs:chore/untrack-gitversion
devs:fix/multiline-pad-clip
devs:fix/issue-112-followups
devs:fix/issue-128-migrate-v3-dedup
devs:fix/delay-timestamp-validation
devs:ref/light-cleanup
devs:fix/history-scroll-pad-redraw-storm
devs:fix/plugin-post-display-incoming-only
devs:merge/upstream-full
devs:merge-improve
devs:chore/remove-chatlog-stage-1
devs:fix/ai-json-encoding
devs:feat/no-db-backlog-114
devs:fix/scroll-non-chat-windows
devs:fix/paged-non-chat-windows
devs:fix/ai-leaks
devs:feat/ai
devs:fix/ai-followups
devs:test/ai-coverage-unit-only
devs:test/ai-coverage
devs:refactor/scroll-mechanism
devs:fix/verify-per-contact-context
devs:feat/no-db-mode
devs:feat/ai-json
devs:feat/pikaur-parity-arch
devs:fix-pikaur-build
devs:feat/upstream-sync
devs:feat/functest-speedup
devs:fix/cwe-134-format-string-audit
devs:ci/separate-build-step
devs:test/autoping-functional-tests
devs:test/db-functional-tests
devs:fix/arch-build
devs:fix/xep-0030-disco-items-error-handling
devs:fix/xep-0030-empty-disco-items
devs:playground/fix/src_refactoring
devs:tests/disco
devs:fix/test-CI-stability
devs:feat/parallel-tests-clean
devs:feat/parallel-functional-tests
devs:fix/functional_tests_v2
devs:fix/functional_tests
devs:fix/connect_max_args
devs:feat/extended_debug_info
devs:playground/fix/scroll-stuck
devs:build/multicore
devs:build/reenable-fedora
devs:build/autoupdate
No Reviewers
Dismiss Review
Are you sure you want to dismiss this review?
Labels
Clear labels
Compat/Breaking
Breaking change that won't be backward compatible
Kind/Bug
Something is not working
Kind/Documentation
Documentation changes
Kind/Enhancement
Improve existing functionality
Kind/Feature
New functionality
Kind/Security
This is security issue
Kind/Testing
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Low
4
The priority is low
Priority
Medium
3
The priority is medium
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: devs/cproof#171
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "fix/omemo-prosody-bootstrap"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #169
Two gaps kept /omemo gen from ever publishing on a fresh account against Prosody:
_omemo_receive_devicelist() recognised "node does not exist" only via the legacy code='404' error attribute. Prosody sends the RFC 6120 condition instead, so the empty-list bootstrap never ran. Now the defined condition is accepted too, and the expected bootstrap case is logged at debug instead of error.
connection_request_features() queried only the server domain, but XEP-0163 PEP services (including pubsub#publish-options) announce their features on the account's bare JID. The bare JID is now registered in the feature table and disco'd as well, so connection_supports() sees PEP features.
Verification: two fresh accounts on Prosody with mutual presence subscription; /omemo gen on both, then /omemo start — previously failed with "Can't find a OMEMO device id".
fix(omemo): bootstrap device list on prosody-class serversto fix(omemo): bootstrap device list on prosody-class servers (#169)I should further verify 404 situation. In theory, we might send onconnect request to barejid instead of server, but I suggest that further testing is required. We should also exercise caution modifying these parts, as there is a high chance to break certain functions.
@@ -661,0 +665,4 @@g_hash_table_insert(conn.features_by_jid, strdup(barejid),g_hash_table_new_full(g_str_hash, g_str_equal, free, NULL));}iq_disco_info_request_onconnect(barejid); // XEP-0163: PEP services announce features on the account's bare JIDso we overwrite the features received from
to=serverby features fromto=barejidhere:fix(omemo): bootstrap device list on prosody-class servers (#169)to fix(omemo): bootstrap device list on prosody servers (#169)View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.