Skip to content

XEP-0115 Entity Capabilities: compliance fixes for §5.4 and §6.2#3191

Open
Copilot wants to merge 2 commits intomainfrom
copilot/investigate-xep-0115-capabilities
Open

XEP-0115 Entity Capabilities: compliance fixes for §5.4 and §6.2#3191
Copilot wants to merge 2 commits intomainfrom
copilot/investigate-xep-0115-capabilities

Conversation

Copy link
Contributor

Copilot AI commented Mar 13, 2026

Openfire's XEP-0115 implementation claimed Version 1.4 compliance but had several gaps against the §5.4 processing method and §6.2 discovery rules.

Fixes

  • Missing node attribute in disco#info requests (§6.2 — MUST): Outbound capability queries were sent without the required node attribute on <query>. Per spec, its value must be {caps-node}#{ver} for backwards-compatibility with legacy clients.

    <!-- Before -->
    <query xmlns='http://jabber.org/protocol/disco#info'/>
    
    <!-- After -->
    <query xmlns='http://jabber.org/protocol/disco#info'
           node='http://example.com/client#QgayPKawpkPSDYmwT/WM94uAlu0='/>
  • Non-conforming data forms included in ver hash (§5.4 item 6): getExtendedDataForms() included all <x xmlns='jabber:x:data'> forms unconditionally. Forms without a FORM_TYPE field, or where FORM_TYPE is not type='hidden', must be ignored per spec — producing incorrect hashes for affected clients.

  • No ill-formed response detection (§5.4 items 3–5): isValid() only checked the hash. Added isWellFormed() (called first) that rejects responses with duplicate identities, duplicate features, multiple forms sharing a FORM_TYPE, or a FORM_TYPE field with conflicting values.

Minor

  • Updated class Javadoc version from 1.4 → 1.5 (the last version with substantive implementation changes; 1.6.0 only adds preimage attack documentation).
  • Fixed broken @see HTML anchor tags in EntityCapabilitiesManager and EntityCapabilitiesListener.

Tests

Added 6 targeted unit tests covering: ignored form without FORM_TYPE, ignored form with non-hidden FORM_TYPE, and all four ill-formed response rejection cases.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: akrherz <210858+akrherz@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate Openfire's XEP-0115 entity capabilities support XEP-0115 Entity Capabilities: compliance fixes for §5.4 and §6.2 Mar 13, 2026
Copilot AI requested a review from akrherz March 13, 2026 18:35
@akrherz akrherz marked this pull request as ready for review March 13, 2026 18:37
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

Successfully merging this pull request may close these issues.

2 participants