mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
Merge pull request #2680 from Iperity/fix-privacy-check-on-presence-probe
Privacy lists: set from/to on packet *before* calling privacy_check_p…
This commit is contained in:
commit
325877446a
@ -638,15 +638,16 @@ route_probe_reply(From, #{jid := To,
|
|||||||
Subscription = get_subscription(To, From),
|
Subscription = get_subscription(To, From),
|
||||||
if IsAnotherResource orelse
|
if IsAnotherResource orelse
|
||||||
Subscription == both orelse Subscription == from ->
|
Subscription == both orelse Subscription == from ->
|
||||||
Packet = misc:add_delay_info(LastPres, To, TS),
|
Packet = xmpp:set_from_to(LastPres, To, From),
|
||||||
case privacy_check_packet(State, Packet, out) of
|
Packet2 = misc:add_delay_info(Packet, To, TS),
|
||||||
|
case privacy_check_packet(State, Packet2, out) of
|
||||||
deny ->
|
deny ->
|
||||||
ok;
|
ok;
|
||||||
allow ->
|
allow ->
|
||||||
ejabberd_hooks:run(presence_probe_hook,
|
ejabberd_hooks:run(presence_probe_hook,
|
||||||
LServer,
|
LServer,
|
||||||
[From, To, self()]),
|
[From, To, self()]),
|
||||||
ejabberd_router:route(xmpp:set_from_to(Packet, To, From))
|
ejabberd_router:route(Packet2)
|
||||||
end;
|
end;
|
||||||
true ->
|
true ->
|
||||||
ok
|
ok
|
||||||
|
Loading…
Reference in New Issue
Block a user