#1862 mod_muc_moderation: Adds occupant-id in the wrong place
Reporter
lovetox
Owner
Nobody
Created
Updated
Stars
★★ (3)
Tags
Compliance
Type-Defect
Component-Community
Status-NeedInfo
Priority-Medium
lovetox
on
Tested today on a prosody 0.12.4 instance
after issuing a moderation IQ, i received this stanza with 2 occupant-ids in the same place
<message from="bafaf@conference.hydrant.one" id="fQKwOaqOmRWG7_qtUIDDjFUQ" to="lovetox2@movim.eu/gajim.ZHPPPAWU" type="groupchat" xmlns="jabber:client">
<apply-to id="f377b6f6-aa26-4950-8451-b2127c7cb50d" xmlns="urn:xmpp:fasten:0">
<moderated by="bafaf@conference.hydrant.one/lovetox2" xmlns="urn:xmpp:message-moderate:0">
<retract xmlns="urn:xmpp:message-retract:0"/>
<reason>Spam</reason>
</moderated>
</apply-to>
<occupant-id id="DVawIKYy92fc7xdHEGw5ockopJ/r19WWbErKY1dx1tE=" xmlns="urn:xmpp:occupant-id:0"/>
<occupant-id id="PupcZUA2WrP7idnIB3eMtNIQDrM2ck7vhaAyHzDQ2w4=" xmlns="urn:xmpp:occupant-id:0"/>
<stanza-id by="bafaf@conference.hydrant.one" id="9e5606d5-65dd-4073-a952-f4a3f90f1983" xmlns="urn:xmpp:sid:0"/>
</message>
lovetox
on
I just checked the tombstone for the same message, and there the occupant id tag is in the right place, but the occupant ids are swaped !
You cannot see this from these two stanzas, but i checked this and if we receive the tombstone it gets attributed to the wrong person.
<message xmlns="jabber:client" to="lovetox2@movim.eu/gajim.ZHPPPAWU" from="bafaf@conference.hydrant.one">
<result xmlns="urn:xmpp:mam:2" id="f377b6f6-aa26-4950-8451-b2127c7cb50d" queryid="9f3e8c40-064d-4786-b2d7-e3709fd8674e">
<forwarded xmlns="urn:xmpp:forward:0">
<delay xmlns="urn:xmpp:delay" stamp="2024-05-21T16:54:43Z" />
<message xmlns="jabber:client" id="68186a6d-952c-4abf-89d3-056c196ff5e7" type="groupchat" from="bafaf@conference.hydrant.one/lovetox_">
<moderated xmlns="urn:xmpp:message-moderate:0" by="bafaf@conference.hydrant.one/lovetox2">
<retracted xmlns="urn:xmpp:message-retract:0" stamp="2024-05-21T17:08:19Z" />
<occupant-id xmlns="urn:xmpp:occupant-id:0" id="DVawIKYy92fc7xdHEGw5ockopJ/r19WWbErKY1dx1tE=" />
<reason>Spam</reason>
</moderated>
<occupant-id xmlns="urn:xmpp:occupant-id:0" id="PupcZUA2WrP7idnIB3eMtNIQDrM2ck7vhaAyHzDQ2w4=" />
</message>
</forwarded>
</result>
</message>
John Livingston
on
I think there is a regression in mod_muc_moderation. I have the same issue.
Tested today on a prosody 0.12.4 instance after issuing a moderation IQ, i received this stanza with 2 occupant-ids in the same place <message from="bafaf@conference.hydrant.one" id="fQKwOaqOmRWG7_qtUIDDjFUQ" to="lovetox2@movim.eu/gajim.ZHPPPAWU" type="groupchat" xmlns="jabber:client"> <apply-to id="f377b6f6-aa26-4950-8451-b2127c7cb50d" xmlns="urn:xmpp:fasten:0"> <moderated by="bafaf@conference.hydrant.one/lovetox2" xmlns="urn:xmpp:message-moderate:0"> <retract xmlns="urn:xmpp:message-retract:0"/> <reason>Spam</reason> </moderated> </apply-to> <occupant-id id="DVawIKYy92fc7xdHEGw5ockopJ/r19WWbErKY1dx1tE=" xmlns="urn:xmpp:occupant-id:0"/> <occupant-id id="PupcZUA2WrP7idnIB3eMtNIQDrM2ck7vhaAyHzDQ2w4=" xmlns="urn:xmpp:occupant-id:0"/> <stanza-id by="bafaf@conference.hydrant.one" id="9e5606d5-65dd-4073-a952-f4a3f90f1983" xmlns="urn:xmpp:sid:0"/> </message>
I just checked the tombstone for the same message, and there the occupant id tag is in the right place, but the occupant ids are swaped ! You cannot see this from these two stanzas, but i checked this and if we receive the tombstone it gets attributed to the wrong person. <message xmlns="jabber:client" to="lovetox2@movim.eu/gajim.ZHPPPAWU" from="bafaf@conference.hydrant.one"> <result xmlns="urn:xmpp:mam:2" id="f377b6f6-aa26-4950-8451-b2127c7cb50d" queryid="9f3e8c40-064d-4786-b2d7-e3709fd8674e"> <forwarded xmlns="urn:xmpp:forward:0"> <delay xmlns="urn:xmpp:delay" stamp="2024-05-21T16:54:43Z" /> <message xmlns="jabber:client" id="68186a6d-952c-4abf-89d3-056c196ff5e7" type="groupchat" from="bafaf@conference.hydrant.one/lovetox_"> <moderated xmlns="urn:xmpp:message-moderate:0" by="bafaf@conference.hydrant.one/lovetox2"> <retracted xmlns="urn:xmpp:message-retract:0" stamp="2024-05-21T17:08:19Z" /> <occupant-id xmlns="urn:xmpp:occupant-id:0" id="DVawIKYy92fc7xdHEGw5ockopJ/r19WWbErKY1dx1tE=" /> <reason>Spam</reason> </moderated> <occupant-id xmlns="urn:xmpp:occupant-id:0" id="PupcZUA2WrP7idnIB3eMtNIQDrM2ck7vhaAyHzDQ2w4=" /> </message> </forwarded> </result> </message>
I think there is a regression in mod_muc_moderation. I have the same issue.
I think that this commit fixes the issue: https://hg.prosody.im/prosody-modules/rev/5ccc03c33158 Note: i'm not an official maintainer, i can't close this issue, or publish any package with the fix.
Sorry, there was another error in my previous commit. I thinks this one is ok: https://hg.prosody.im/prosody-modules/rev/5076b78c95ef
Thanks for the report and for the patches. Could someone verify?
Changes