25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

mod_caps: Only store CAPS if contact is subscribed

If a user is subscribed to a contact but not vice versa, don't store the
contact's CAPS.  This makes sure no PEP items are leaked to the contact.
This commit is contained in:
Holger Weiss 2018-01-29 01:07:38 +01:00
parent d0af61f488
commit f31782a252

View File

@ -209,7 +209,7 @@ c2s_presence_in(C2SState,
ToSelf = (From#jid.luser == To#jid.luser)
and (From#jid.lserver == To#jid.lserver),
Insert = (Type == available)
and ((Subscription == both) or (Subscription == to) or ToSelf),
and ((Subscription == both) or (Subscription == from) or ToSelf),
Delete = (Type == unavailable) or (Type == error),
if Insert or Delete ->
LFrom = jid:tolower(From),