]> granicus.if.org Git - ejabberd/commit
Before forwarding last activity requests to a user, check that the user's presence...
authorAndreas Köhler <andreas.koehler@1und1.de>
Fri, 5 Nov 2010 14:44:22 +0000 (15:44 +0100)
committerBadlop <badlop@process-one.net>
Wed, 10 Nov 2010 14:40:01 +0000 (15:40 +0100)
commit510fd8cf73f220720827bf72a973813f1f4252ba
treea2bbb7f9a63a562cfec07353b697a7505adf9d99
parent080922a3de70e33954ded28c8e86f9761465dfa5
Before forwarding last activity requests to a user, check that the user's presence is visible for From

According to XEP-0012, 4. Online User Query, "if the requesting entity
is not authorized to view the user's presence information (normally via
a presence subscription as defined in XMPP IM), the user's server MUST
NOT deliver the IQ-get to an available resource but instead MUST return
a <forbidden/> error in response to the last activity request."

So check for a subscription of from of the jid and bare jid and whether
outgoing presences to From are allowed.

Fixes problem 3 of EJAB-1158.
src/ejabberd_c2s.erl