powered by Jive Software

Blocking Command buggy with multiple Clients and OfflineStorage

I know that XEP-191 was added with https://github.com/igniterealtime/Openfire/commit/8ba4b211fcf2125aa7e0037f5a8c6e804139a9f4
So i added a several jids to test (bare and fulljids) but the stanzas from my blocked testusers are still routed to the client…
The JIDs were added successfully to the Privacy Lists… I can see them in the admin console…

XEP 191 @ 3.3 says the following:

Once the user has blocked communications with a JID, the user’s server MUST NOT deliver any XML stanzas from the JID to the user. The block remains in force until the user subsequently unblocks commmunications with the JID (i.e., the duration of the block is potentially unlimited and applies across sessions).

EDIT: It seems the message are stored in OfflineMessageStorage so that they are delivered if the receiver comes online… Wouldnt it be better to dont save them to offlinestorage if the user is blocked?

EDIT2: It also seems that the privacy list does take a while until it will block the traffic. Maybe it is only refreshed after user reconnects… because if i am online with two clients on one account and i block another user the message are still routed by openfire…

Edit 3: i also added a 4th Client Gajim with a running XML Console… I noticed that the messages are carbons which arrive at gajim… so maybe the MessageCarbonHandler should check for PrivacyList too

My Setup:
Openfire 4.6
Conversations at 5222
and two Instances of JSXC on which i am implementing XEP 191 on Bosh Connection 7443
I can write from one JSXC (blocked user) to the other JSXC (one of the two clients that block the sender)

created https://igniterealtime.atlassian.net/browse/OF-2189

Furthermore i noticed that Openfire does not follow the standard XEP 191 when sending the error message…
The packet should look like this:

<message type='error' from='romeo@montague.net' to='juliet@capulet.com'>
  <error type='cancel'>
    <not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    <blocked xmlns='urn:xmpp:blocking:errors'/>

but it does like this (when sending from user to blocked user)

<message id="b3230ca3-f1e1-4ce4-9650-3b254e4a7717" to="romeo@montague.net/ressource" type="error" xmlns="jabber:client">
   <origin-id xmlns="urn:xmpp:sid:0\" id="b3230ca3-f1e1-4ce4-9650-3b254e4a7717"/>
   <error code="406" type="modify">
      <not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>

so the tag <blocked xmlns='urn:xmpp:blocking:errors'/> is missing

and when sending from blocked user to user which blocked the sender:

<message xmlns="jabber:client" id="65875dca-f98c-4f70-beac-383b93d6b21a" from="romeo@montague.net" to="juliet@capulet.com" type="error" >
   <origin-id xmlns="urn:xmpp:sid:0" id="65875dca-f98c-4f70-beac-383b93d6b21a"/>
   <error code="503" type="cancel">
      <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>

so the tags <blocked xmlns='urn:xmpp:blocking:errors'/> and
<not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/> are missing

i think <blocked xmlns='urn:xmpp:blocking:errors'/> is the most important here…

I’ve worked on a few fixes, and provided other feedback in the JIRA issue.

1 Like

Ok i will test it later…
results @ Jira

I added a further comment in Jira with another bug relating to blocking command error messages…

1 Like