processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6.01k stars 1.5k forks source link

As an owner of a node I can't overwrite existing items #4098

Closed edhelas closed 9 months ago

edhelas commented 9 months ago

Environment

ejabberd.yml

  "movim.eu":
    modules:
      mod_pubsub:
        hosts:
          - "blabla.@HOST@"

Bug description

As an owner of a Pubsub node, when I try to overwrite an existing item published by another publisher in the node, I have the following publication error:

<iq xml:lang='en' to='test@movim.eu/movimMfdKhX' from='blabla.movim.eu' type='error' id='3fmE22'>
    <pubsub xmlns='http://jabber.org/protocol/pubsub'>
        <publish node='testtesttest'>
            <item id='c8137bd0-27c9-4bf3-87ab-ee2949eda868'>
                <entry xmlns='http://www.w3.org/2005/Atom'>
                    ...
                </entry>
            </item>
        </publish>
    </pubsub>
    <error type='auth'>
        <forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    </error>
</iq> 

As an owner I am able to delete the actual item so I also should be able to publish on top of it, see https://xmpp.org/extensions/xep-0060.html#affiliations

The same behavior should apply with publishers.

licaon-kter commented 9 months ago

You've tested HEAD too? eg. maybe it was fixed by commits like https://github.com/processone/ejabberd/commit/c3e0b746d7c0548853f2d8f9b19e45fa24dffb87

edhelas commented 9 months ago

It's on my production, so I'm only deploying stable DEB packages from ProcessOne :)

prefiks commented 9 months ago

Commit f75909db4cd6e831997bdf8afbf6b504492772a6 should allow doing that.