[ejabberd] Setting privacy list with deny presence-out - still get presence from myself

Daniel Dormont dan at greywallsoftware.com
Thu Oct 11 20:28:13 MSK 2012


Hi folks,

I have implemented invisibility in my application in accordance with
XEP-0126. I'm seeing a strange result, in which after I send a
presence as illustrated in Example 2, I get that same presence sent
back to the same resource, which as far as I know should not happen,
according to the privacy list. Here's the exact sequence, with a brand
new user (my client is custom-built, using Strophe):

First I check whether the list exists:

<body rid='770372865' xmlns='http://jabber.org/protocol/httpbind'
sid='7b0fd3da3ba9591227083b787f68aba79a585f3a'><presence
type='unavailable' xmlns='jabber:client'/><iq type='get' id='getlist'
xmlns='jabber:client'><query xmlns='jabber:iq:privacy'/></iq></body>

I get the response saying it doesn't:

<body xmlns='http://jabber.org/protocol/httpbind'><iq
xmlns='jabber:client' from='user_8 at xmpp.example.com'
to='user_8 at xmpp.example.com/18742385261349971717761171' id='getlist'
type='result'><query xmlns='jabber:iq:privacy'/></iq></body>

Then I create the list:

<body rid='770372866' xmlns='http://jabber.org/protocol/httpbind'
sid='7b0fd3da3ba9591227083b787f68aba79a585f3a'><iq type='set'
xmlns='jabber:client' id='8406:sendIQ'><query
xmlns='jabber:iq:privacy'><list name='invisible'><item action='allow'
order='1' type='jid'
value='conference.xmpp.example.com'><presence-out/></item><item
action='deny' order='2'><presence-out/></item></list></query></iq></body>

And I get the confirmation on that:

<body xmlns='http://jabber.org/protocol/httpbind'><iq
xmlns='jabber:client' from='user_8 at xmpp.example.com'
to='user_8 at xmpp.example.com/18742385261349971717761171'
id='push2816517726' type='set'><query xmlns='jabber:iq:privacy'><list
name='invisible'/></query></iq><iq xmlns='jabber:client'
from='user_8 at xmpp.example.com'
to='user_8 at xmpp.example.com/18742385261349971717761171'
id='8406:sendIQ' type='result'/></body>

Then I set the list as active:

<body rid='770372867' xmlns='http://jabber.org/protocol/httpbind'
sid='7b0fd3da3ba9591227083b787f68aba79a585f3a'><iq type='set'
xmlns='jabber:client' id='8407:sendIQ'><query
xmlns='jabber:iq:privacy'><active
name='invisible'/></query></iq></body>

And I get the confirmation on that:

<body xmlns='http://jabber.org/protocol/httpbind'><iq
xmlns='jabber:client' from='user_8 at xmpp.example.com'
to='user_8 at xmpp.example.com/18742385261349971717761171'
id='8407:sendIQ' type='result'/></body>

Then I send the available presence, according to the spec:

<body rid='770372868' xmlns='http://jabber.org/protocol/httpbind'
sid='7b0fd3da3ba9591227083b787f68aba79a585f3a'><presence
xmlns='jabber:client'/></body>

And I get back that same presence, even though I would expect not to:

<body xmlns='http://jabber.org/protocol/httpbind'><message
xmlns='jabber:client' from='xmpp.example.com'
to='user_8 at xmpp.example.com'
type='normal'><subject>Welcome!</subject><body>Welcome to a Jabber
service powered by Debian. For information about Jabber visit
http://www.jabber.org</body><delay xmlns='urn:xmpp:delay'
from='xmpp.example.com' stamp='2012-10-11T16:08:37Z'>Offline
Storage</delay><x xmlns='jabber:x:delay'
stamp='20121011T16:08:37'/></message><presence xmlns='jabber:client'
from='user_8 at xmpp.example.com/18742385261349971717761171'
to='user_8 at xmpp.example.com/18742385261349971717761171'/></body>

I'm currently running Ejabberd 2.1.6 on Ubuntu 11.10. What's weird is
I have a similar instance set up in another environment, and I'm not
seeing the problem there. But I have no idea what the difference could
be. Any idea where I might begin to look for this?

thanks,
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20121011/b516c273/attachment.html>


More information about the ejabberd mailing list