baiwyc119 / lxmppd

Automatically exported from code.google.com/p/lxmppd
0 stars 0 forks source link

[mod_muc/mod_privacy] User gets kicked from room if they block an occupant's room JID #384

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Login with two users (A@example.com, B@example.com) & have them in the same 
room (test@conference.example.com/A, test@conference.example.com/B)

In my UC, B is the current owner of the room. I guess (but didn't test it) if B 
is not the owner, or A is the owner, it doesn't happen.

2. Create privacy list "ignore" for user A & add user B to it:

Result from getting the current privacy list for A:

<iq id='3:sendIQ' type='result' to='A@example.com/Candy'>
  <query xmlns='jabber:iq:privacy'>
    <list name='ignore'>
      <item value='test@conference.example.com/B' type='jid' action='deny' order='0'><message/></item>
    </list>
  </query>
</iq>

3. With User B, whisper to A (in the muc room):

<message to='test@conference.example.com/A' from='B@example.com/Candy' 
type='chat' id='msg:10' xmlns='jabber:client'>
  <body xmlns='jabber:client'>TEST</body>
</message> 

4. User A will be kicked out of room test@conference.example.com without 
receiving message TEST:

<presence type='unavailable' to='A@example.com/Candy' 
from='test@conference.localhost/A'>
  <status>Kicked: service unavailable</status>
  <x xmlns='http://jabber.org/protocol/muc#user'>
    <item affiliation='none' role='none'/>
    <status code='110'/>
  </x>
</presence>

What is the expected output? What do you see instead?
User A should just not receive the message from B.

What version of the product are you using? On what operating system?
Prosody 0.9.1, OSX 10.9

Original issue reported on code.google.com by michael....@gmail.com on 17 Jan 2014 at 4:10

GoogleCodeExporter commented 9 years ago
Debug info from prosody.log:

Jan 17 16:58:30 mod_muc debug   B@example.com/Candy sent private stanza to 
test@conference.example.com/A (A@example.com/Candy)
Jan 17 16:58:30 localhost:privacy   debug   stanza blocked: message, to: 
A@example.com/Candy, from: test@conference.example.com/B
Jan 17 16:58:30 mod_muc debug   room: test@conference.conference.example.com, 
current_nick: test@conference.example.com/A, stanza: <message id='msg:10' 
type='error' to='test@conference.example.com/B' from='A@example.com/Candy'>
Jan 17 16:58:30 mod_muc debug   test@conference.example.com/A kicked from 
test@conference.example.com for sending an error message
Jan 17 16:58:30 mod_muc debug   room: test@conference.example.com, current_nick: 
test@conference.example.com/A, stanza: <presence type='unavailable' 
to='test@conference.example.com/B' from='A@conference.example.com/Candy'>
Jan 17 16:58:30 mod_muc debug   test@conference.example.com/A leaving 
test@conference.example.com

Original comment by michael....@gmail.com on 17 Jan 2014 at 4:16

GoogleCodeExporter commented 9 years ago
Hi, thanks for bringing up this issue.

It's something of a specification bug in my opinion, but we need to look into 
workarounds.

I'm marking it for 0.9, but if the solution requires major changes it may get 
pushed to 0.10.

Original comment by MWild1 on 17 Jan 2014 at 4:36