[Standards-JIG] XEP0191 - Blocking - Directed Presense

Peter Saint-Andre stpeter at jabber.org
Mon Oct 16 20:17:39 UTC 2006


Joe Hildebrand wrote:
> Maybe we could add another rule that says if you unblock, the server
> should also direct all current presences to that user to which that user
> is now entitled?

I have no objection to that functionality.

However...

> On Oct 11, 2006, at 7:29 PM, Chris Mullins wrote:
> 
>> Let's say a user announces presence.
>>
>> The server would attempt to send presence to user at otherserver.com, run
>> into a block, and get back <not-acceptable/>.

The server wouldn't receive a <not-acceptable/> error if the user just
announces presence. The behavior would be as follows:

C: <presence/>

S: [checks blocks in place]

S: sends presence to all subscribers except those who are blocked

At least that's how I read "user announces presence" (i.e., this is
"broadcasted presence").

Now, in the case of directed presence you would see the following:

C: <presence from='romeo at montague.net' to='juliet at capulet.com'/>

S: [checks blocks in place]

S: <presence to='romeo at montague.net' from='juliet at capulet.com' type='error'>
  <error type='cancel'>
    <not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    <blocked xmlns='http://jabber.org/protocol/blocking#errors'/>
  </error>
</presence>

The error is returned to the client, not received by the sender's server
from the contact's server. So this is false:

>> This presence error is then added to the presence error table in the
>> server, and no presence packets can be sent here (xmpp requirement).

Or at least that's how I read it.

>> The remote user then removes the block, but my server isn't going to
>> send them prences, as we're in an in-between state. Not until they send
>> us presence will the expected results happen. Is this race condition
>> acceptable to everyone?

OK, that is a different scenario -- the *contact* has applied the block.

So in that situation Juliet has blocked Romeo, Romeo sends directed
presence (or any kind of presence, no?) to Juliet, and Romeo's server
receives an error from Juliet's server.

But do we require the contact's server to return an error? IMHO the
server should simply eat the presence packet and not return an error.
And this is consistent with Section 2.14 of XEP-0016, which states:

"If a blocked entity attempts to send message or presence stanzas to the
user, the user's server SHOULD silently drop the stanza and MUST NOT
return an error to the sending entity."

I think we would follow the same rule here (i.e., XEP-0191 is fully
consistent with XEP-0016, it's just a simpler front-end to a limited
subset of the same functionality).

Naturally this needs to be clarified, but if my reasoning is correct
then we don't need to worry about your corner case.

Peter

-- 
Peter Saint-Andre
Jabber Software Foundation
http://www.jabber.org/people/stpeter.shtml

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7358 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.jabber.org/pipermail/standards/attachments/20061016/18517922/attachment.bin>


More information about the Standards mailing list