mirror of
https://github.com/processone/ejabberd.git
synced 2024-10-05 14:51:05 +02:00
Always allow packets from user's server and bare jid in mod_privacy*
This commit is contained in:
parent
66a5aff323
commit
f04fe5f743
@ -559,6 +559,27 @@ get_user_list(_, User, Server) ->
|
|||||||
%% From is the sender, To is the destination.
|
%% From is the sender, To is the destination.
|
||||||
%% If Dir = out, User@Server is the sender account (From).
|
%% If Dir = out, User@Server is the sender account (From).
|
||||||
%% If Dir = in, User@Server is the destination account (To).
|
%% If Dir = in, User@Server is the destination account (To).
|
||||||
|
check_packet(_, _User, _Server,
|
||||||
|
_UserList,
|
||||||
|
{#jid{luser = "", lserver = Server} = _From,
|
||||||
|
#jid{lserver = Server} = _To,
|
||||||
|
_},
|
||||||
|
in) ->
|
||||||
|
allow;
|
||||||
|
check_packet(_, _User, _Server,
|
||||||
|
_UserList,
|
||||||
|
{#jid{lserver = Server} = _From,
|
||||||
|
#jid{luser = "", lserver = Server} = _To,
|
||||||
|
_},
|
||||||
|
out) ->
|
||||||
|
allow;
|
||||||
|
check_packet(_, _User, _Server,
|
||||||
|
_UserList,
|
||||||
|
{#jid{luser = User, lserver = Server} = _From,
|
||||||
|
#jid{luser = User, lserver = Server} = _To,
|
||||||
|
_},
|
||||||
|
_Dir) ->
|
||||||
|
allow;
|
||||||
check_packet(_, User, Server,
|
check_packet(_, User, Server,
|
||||||
#userlist{list = List, needdb = NeedDb},
|
#userlist{list = List, needdb = NeedDb},
|
||||||
{From, To, {xmlelement, PName, Attrs, _}},
|
{From, To, {xmlelement, PName, Attrs, _}},
|
||||||
|
@ -557,6 +557,27 @@ get_user_list(_, User, Server) ->
|
|||||||
%% From is the sender, To is the destination.
|
%% From is the sender, To is the destination.
|
||||||
%% If Dir = out, User@Server is the sender account (From).
|
%% If Dir = out, User@Server is the sender account (From).
|
||||||
%% If Dir = in, User@Server is the destination account (To).
|
%% If Dir = in, User@Server is the destination account (To).
|
||||||
|
check_packet(_, _User, _Server,
|
||||||
|
_UserList,
|
||||||
|
{#jid{luser = "", lserver = Server} = _From,
|
||||||
|
#jid{lserver = Server} = _To,
|
||||||
|
_},
|
||||||
|
in) ->
|
||||||
|
allow;
|
||||||
|
check_packet(_, _User, _Server,
|
||||||
|
_UserList,
|
||||||
|
{#jid{lserver = Server} = _From,
|
||||||
|
#jid{luser = "", lserver = Server} = _To,
|
||||||
|
_},
|
||||||
|
out) ->
|
||||||
|
allow;
|
||||||
|
check_packet(_, _User, _Server,
|
||||||
|
_UserList,
|
||||||
|
{#jid{luser = User, lserver = Server} = _From,
|
||||||
|
#jid{luser = User, lserver = Server} = _To,
|
||||||
|
_},
|
||||||
|
_Dir) ->
|
||||||
|
allow;
|
||||||
check_packet(_, User, Server,
|
check_packet(_, User, Server,
|
||||||
#userlist{list = List, needdb = NeedDb},
|
#userlist{list = List, needdb = NeedDb},
|
||||||
{From, To, {xmlelement, PName, Attrs, _}},
|
{From, To, {xmlelement, PName, Attrs, _}},
|
||||||
|
Loading…
Reference in New Issue
Block a user