Incoming packets

Behnam Hatami
Added about 4 years ago

I want to have diferent responses due to incoming packet permision, but as I checked incoming packet permisions, it is always none, why tigase doesn't set packet permision for incomming packet? (I send the packet from client with admin user but in server I recieve a packet with none permision)

Replies (3)

Added by Wojciech Kapcia TigaseTeam about 4 years ago

What do you mean by incoming packet? In which component? Due to the architecture of Tigase packet permissions are set mostly in SessionManager.

Added by Behnam Hatami about 4 years ago

The client sends an iq request to the server that get an information of other user. A plugin is assigned to answer to this request. It should has this mechanism that when the client is in the other user's buddies or when the client is admin response to the request, otherwise should answer forbidden. when I send a request from a client that login with an admin account, when I check the packet permision that given to the plugin, it is None, but I think it should be admin (because client log in with admin account). Is there any reason for this?


Added by Artur Hefczyc TigaseTeam about 4 years ago

I think this is quite good point. There is a mechanism in Tigase which sets permissions on packets produced by a plugin. However, the same code could be executed on incoming packets before they are processed by plugins. I have added a ticket for this: #2835, so it will be supported in the future the way you describe.

In the meantime I can only suggest you make the change described in the ticket yourself.