mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
Merge 1880 from trunk.
* src/mod_muc/mod_muc_room.erl: Owner of a password protected room must provide the password, like other participants (EJAB-867) SVN Revision: 1946
This commit is contained in:
parent
fe297e1dea
commit
4046ecc99e
@ -1,5 +1,8 @@
|
||||
2009-03-03 Badlop <badlop@process-one.net>
|
||||
|
||||
* src/mod_muc/mod_muc_room.erl: Owner of a password protected room
|
||||
must provide the password, like other participants (EJAB-867)
|
||||
|
||||
* src/mod_muc/mod_muc_log.erl: Prevent XSS in MUC logs by
|
||||
linkifying only a few known protocols (EJAB-850)
|
||||
|
||||
|
@ -1512,7 +1512,7 @@ add_new_user(From, Nick, Packet, StateData) ->
|
||||
From, Err),
|
||||
StateData;
|
||||
{_, _, _, Role} ->
|
||||
case check_password(Affiliation,
|
||||
case check_password(ServiceAffiliation,
|
||||
exmpp_xml:get_child_elements(Packet),
|
||||
StateData) of
|
||||
true ->
|
||||
@ -1574,8 +1574,9 @@ add_new_user(From, Nick, Packet, StateData) ->
|
||||
end.
|
||||
|
||||
check_password(owner, _Els, _StateData) ->
|
||||
%% Don't check pass if user is owner in MUC service (access_admin option)
|
||||
true;
|
||||
check_password(_Affiliation, Els, StateData) ->
|
||||
check_password(_ServiceAffiliation, Els, StateData) ->
|
||||
case (StateData#state.config)#config.password_protected of
|
||||
false ->
|
||||
true;
|
||||
|
Loading…
Reference in New Issue
Block a user