Support additional namespaces when parsing streams

Description

XMPP stanzas are transmitted in a <stream> root element. The element is qualified by the namespace http://etherx.jabber.org/streams. The namespace of the stanza is defined by the type of connection that they are sent over (eg: jabber:client, jabber:server).

Openfire discards this namespace information (and processes stanzas as if they were independent XML documents in a default namespace). This works well, unless ‘stanzas’ arrive that use a prefix that was defined on the (now discarded) stream: the XML parser does not know about the namespace that the prefix relates to, and throws an exception.

Although defining namespace prefix on the root stream element is valid XML/XMPP, it is rare to occur ‘in the wild’. I have never seen this happen, with one notable exception: Dialback.

Openfire should be improved to be able to process elements that use a prefix of a namespace that is defined on the root stream element.

Environment

None

blocks

is related to

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created December 3, 2022 at 1:52 PM
Updated September 6, 2023 at 2:07 PM
Resolved December 7, 2022 at 8:58 AM