mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
Correct privacy check direction in mod_last (EJAB-1339)
The change for EJAB-1271 to change the direction of the privacy check from out to in violates the idea that the check should imitate a subscription state check of from. Rather correct the order of the From and To parameters.
This commit is contained in:
parent
6ce29e7ecb
commit
e710ac51eb
@ -152,9 +152,9 @@ process_sm_iq(From, To, #iq{type = get} = IQ_Rec) ->
|
|||||||
privacy_check_packet, exmpp_jid:prep_domain(To),
|
privacy_check_packet, exmpp_jid:prep_domain(To),
|
||||||
allow,
|
allow,
|
||||||
[exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To), UserListRecord,
|
[exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To), UserListRecord,
|
||||||
{From, To,
|
{To, From,
|
||||||
exmpp_presence:available()},
|
exmpp_presence:available()},
|
||||||
in]) of
|
out]) of
|
||||||
allow ->
|
allow ->
|
||||||
get_last(IQ_Rec, exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To));
|
get_last(IQ_Rec, exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To));
|
||||||
deny ->
|
deny ->
|
||||||
|
@ -111,9 +111,9 @@ process_sm_iq(From, To, #iq{type = get} = IQ_Rec) ->
|
|||||||
privacy_check_packet, exmpp_jid:prep_domain(To),
|
privacy_check_packet, exmpp_jid:prep_domain(To),
|
||||||
allow,
|
allow,
|
||||||
[exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To), UserListRecord,
|
[exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To), UserListRecord,
|
||||||
{From, To,
|
{To, From,
|
||||||
exmpp_presence:available()},
|
exmpp_presence:available()},
|
||||||
in]) of
|
out]) of
|
||||||
allow ->
|
allow ->
|
||||||
get_last(IQ_Rec, User, Server);
|
get_last(IQ_Rec, User, Server);
|
||||||
deny ->
|
deny ->
|
||||||
|
Loading…
Reference in New Issue
Block a user