Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to block anonymous user in XMPP

In order to implement chat functionality in my app, I have integrated XMPP framework in to it. There is no buddy request functionality hence users can send messages to other users without sending a buddy request. Due to this functionality I have not created any Roster or Privacy list in the app, and anonymous chat mode has been implemented.

Everything works fine except block user functionality, since this is an anonymous user chat hence there is no privacy list for the users, and XMPP extension XEP-016 only supports blocking through privacy list.

I have also tried to look for the alternatives and one of them is to implement XEP-0191 but unfortunately Open Fire does not supports this extension.

So techies please guide me to fix this problem. Following are my questions.

  1. Do I need to create a privacy list/roster to block a user in anonymous user chat mode. This solution looks impractical since my app may have thousands of users.

  2. Shall I Change the Jabber server from open fire to EJabber? Does Ejabber support XEP-0191

Apart from above please let me know if you guys know any other workaround to block/unblock a user in anonymous user chat mode in Jabber.

like image 414
sandy Avatar asked May 05 '13 08:05

sandy


2 Answers

I have no experience with EJabber server, but XEP 0191 is definitely the protocol you need.

You may have a look here http://www.ejabberd.im/protocols and see, that EJabber supports your protocol.

My advice will be to change the server.

like image 163
Asaf Shveki Avatar answered Sep 29 '22 01:09

Asaf Shveki


A block is moot anyway. If you block a person they could just create a new anonymous user and start contacting you again. Whilst this might seem like a lot of effort it could easily be scripted to send spam messages. Every 30mins you create a new account and spam everybody, get kicked and repeat.

At the very least you are going to have to implement XEP-0191 (server side block list) and figure out how to deal with anonymous new accounts.

like image 30
Phil Hannent Avatar answered Sep 29 '22 02:09

Phil Hannent