Uploaded image for project: 'Openfire'
  1. Openfire
  2. OF-1132

Monitoring plugin does not add namespace

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.0
    • Component/s: None
    • Labels:
      None

      Description

      After OF-1087, (applied in 1.5.1) the Monitoring plugin stopped returning namespaces in messages that it returns as part of a retrieve-archive request.

      As you can see in the reproduction below, the archived messages are returned without a namespace (look at the stanza with ID purpleed855cd3 for example).

      If no 'xmlns' is set for the stanza then as per XML namespacing rules it would inherit the 'urn:xmpp:forward:0' namespace, which is wrong (see XEP-0297).

      Stanzas should be saved with their original namespace (which will cause them to be returned with their original namespace), but as that won't fix existing archives, and the only stanza being saved is a message stanza, the namespace perhaps could be reconstructed when constucting the MAM response.

      Reproduction:

      <iq id="4" type="set">
          <query queryid="4" xmlns="urn:xmpp:mam:0">
              <set xmlns="http://jabber.org/protocol/rsm">
                  <max>50</max>
                  <before/>
              </set>
              <x type="submit" xmlns="jabber:x:data">
                  <field var="FROM_TYPE">
                      <value>urn:xmpp:mam:0</value>
                  </field>
                  <field var="with"/>
              </x>
          </query>
      </iq>
      
      <message to='admin@laptop-guus/lsu7lr87z'>
          <result xmlns='urn:xmpp:mam:0' id='1' queryid='4'>
              <forwarded xmlns='urn:xmpp:forward:0'>
                  <delay xmlns='urn:xmpp:delay' stamp='2016-04-27T18:49:05.495Z'/>
                  <message type='chat' id='purpleed855cd3' to='admin@laptop-guus' from='admin@laptop-guus/3aa6ard3tv'>
                      <active xmlns='http://jabber.org/protocol/chatstates'/>
                      <body>test test test</body>
                  </message>
              </forwarded>
          </result>
      </message>
      <message to='admin@laptop-guus/lsu7lr87z'>
          <fin xmlns='urn:xmpp:mam:0' queryid='4' complete='true'>
              <set xmlns='http://jabber.org/protocol/rsm'>
                  <first index='0'>1</first>
                  <last>1</last>
                  <count>1</count>
              </set>
          </fin>
      </message>
      <iq type='result' id='4' to='admin@laptop-guus/lsu7lr87z'/>

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                guus Guus der Kinderen
                Reporter:
                guus Guus der Kinderen
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: