How to block anonymous user in XMPP

To implement the chat features in my application, I have an integrated XMPP infrastructure. There is no interlocutor request function, so users can send messages to other users without sending an interlocutor request. Due to this functionality, I did not create an application list or privacy list in the application, and there was an anonymous chat mode.

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

I also tried to find alternatives, and one of them is to implement XEP-0191, but, unfortunately, Open Fire does not support this extension.

So techies, please help me solve this problem. Below are my questions.

  • I need to create a list / privacy list to block the user in anonymous chat mode. This solution seems impractical since my application can have thousands of users.

  • Should I change the Jabber server from open fire to EJabber? Does Ejabber XEP-0191 support

In addition to the above, let me know if you know any other ways to bypass / block a user in anonymous chat mode in Jabber.

+7
source share
3 answers

Unfortunately, I have to stick with Open Fire Server. To fix the problem with the block user, I had to go through the XMPP documentation and finally find a solution in XEP-0016, this extension really has the ability to support anonymous user blocking. To do this, create a privacy list on the server using the - (void)setListWithName:(NSString *)privacyListName items:(NSArray *)items fromUser:(NSString *)user; . After that, create the list as an active list by calling the - (void)setActiveListName:(NSString *)privacyListName; .

XEP-0016 has nothing to do with the registry, and it can block the user's anonymous chat.

0
source

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

You can look here http://www.ejabberd.im/protocols and see what EJabber supports your protocol.

My advice is to change the server.

+1
source

In any case, the block is controversial. If you block a person, he can simply create a new anonymous user and contact you again. Although this may seem like a lot of effort, it can be easily configured to send spam messages. Every 30 minutes you create a new account and spam everyone, kick and repeat.

At the very least, you will need to implement XEP-0191 (a list of blocks on the server side) and figure out how to work with anonymous new accounts.

+1
source

All Articles