mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +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:
parent
d0af61f488
commit
f31782a252
@ -209,7 +209,7 @@ c2s_presence_in(C2SState,
|
|||||||
ToSelf = (From#jid.luser == To#jid.luser)
|
ToSelf = (From#jid.luser == To#jid.luser)
|
||||||
and (From#jid.lserver == To#jid.lserver),
|
and (From#jid.lserver == To#jid.lserver),
|
||||||
Insert = (Type == available)
|
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),
|
Delete = (Type == unavailable) or (Type == error),
|
||||||
if Insert or Delete ->
|
if Insert or Delete ->
|
||||||
LFrom = jid:tolower(From),
|
LFrom = jid:tolower(From),
|
||||||
|
Loading…
Reference in New Issue
Block a user