[jdev] Presence Subscription to nonexistent contact

Peter Saint-Andre stpeter at stpeter.im
Fri Nov 2 03:05:30 UTC 2012

Hash: SHA1

On 11/1/12 6:57 PM, Daniel Dormont wrote:
> Hi all,
> If as a user I send a presence subscription request to a contact - 
> suppose it's in my same domain for the time being - that does not
> exist, what happens? It looks from my experiments so far that the
> contact does get added to the user's roster with a subscription
> type of "none" and ask="subscribe". However, at a later time,
> should the contact spring into existence and log in, that contact
> will not receive the presence subscription request.

Right, because no existing server implementations will store inbound
presence subscriptions for nonexistent users (AFAIK).

> Is this correct behavior?

That is the defined behavior, to the extent that this strange scenario
is covered by RFC 6121. Whether that is truly correct is another
matter. Right now I don't see anything better, but I might be missing

> If so, is there anything I can do to inform the user of this so the
> user knows to retry the subscription request at a later time?

I think you would need to patch the server you're using so that it
supports storage of inbound presence subscriptions for nonexistent. Do
be aware that this introduces a new attack surface (overloading the
server with subscription requests for millions of nonexistent users
might result in resource exhaustion).


- -- 
Peter Saint-Andre

Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/


More information about the JDev mailing list