#1427 MUC: do not add excess <x/> elements

Reporter ge0rg
Owner Zash
Created
Updated
Stars ★ (1)
Tags
  • Priority-Medium
  • Status-Fixed
  • Type-Defect
  • Milestone-0.11
  1. ge0rg on

    In prosody 0.11, the MUC component will always add an `<x xmlns='http://jabber.org/protocol/muc#user' />` element: https://hg.prosody.im/0.11/file/tip/plugins/muc/muc.lib.lua#l782 This happens even when such an element already was added by the client. Example: client sends: ``` <message to='xmpp@chat.yax.im/Ge0rG' id='PwMdy-113187' type='chat'> <body>test</body> <request xmlns='urn:xmpp:receipts'/> <x xmlns='http://jabber.org/protocol/muc#user'></x> </message> ``` prosody carbon-copies the "sent" message, all is good yet: ``` <message to="georg@yax.im/poezio" id="718d40df-3948-4798-a99b-35cc9f03cc4f-A93B" type="chat" from="georg@yax.im"> <sent xmlns="urn:xmpp:carbons:2"> <forwarded xmlns="urn:xmpp:forward:0"> <message xmlns="jabber:client" to="xmpp@chat.yax.im/Ge0rG" id="PwMdy-113187" type="chat" from="georg@yax.im/yaxim"> <body>test</body> <request xmlns="urn:xmpp:receipts"/> <x xmlns="http://jabber.org/protocol/muc#user"/> </message> </forwarded> </sent> </message> ``` The message goes through the MUC component and is reflected, with two <x/> elements: ``` <message to="georg@yax.im/poezio-IS8H" id="PwMdy-113187" type="chat" from="xmpp@chat.yax.im/Ge0rG"> <body>test</body> <request xmlns="urn:xmpp:receipts"/> <x xmlns="http://jabber.org/protocol/muc#user"/> <x xmlns="http://jabber.org/protocol/muc#user"/> <stanza-id xmlns="urn:xmpp:sid:0" id="d40b47ae-8600-44c0-b399-ee144872247b" by="georg@yax.im"/> </message> ```

  2. Zash on

    Thanks for the report. Fixed in https://hg.prosody.im/trunk/rev/f9301d93de72

    Changes
    • tags Status-Fixed Milestone-0.11
    • owner Zash

New comment

Not published. Used for spam prevention and optional update notifications.