25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

* src/mod_muc/mod_muc_room.erl: Owner of a password protected room

must provide the password, like other participants (EJAB-867)

SVN Revision: 1880
This commit is contained in:
Badlop 2009-02-16 15:57:02 +00:00
parent f6ddd8bc5b
commit 22d87353be
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,8 @@
2009-02-16 Badlop <badlop@process-one.net> 2009-02-16 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 * src/mod_muc/mod_muc_log.erl: Prevent XSS in MUC logs by
linkifying only a few known protocols (EJAB-850) linkifying only a few known protocols (EJAB-850)

View File

@ -1489,7 +1489,7 @@ add_new_user(From, Nick, {xmlelement, _, Attrs, Els} = Packet, StateData) ->
From, Err), From, Err),
StateData; StateData;
{_, _, _, Role} -> {_, _, _, Role} ->
case check_password(Affiliation, Els, StateData) of case check_password(ServiceAffiliation, Els, StateData) of
true -> true ->
NewState = NewState =
add_user_presence( add_user_presence(
@ -1546,8 +1546,9 @@ add_new_user(From, Nick, {xmlelement, _, Attrs, Els} = Packet, StateData) ->
end. end.
check_password(owner, _Els, _StateData) -> check_password(owner, _Els, _StateData) ->
%% Don't check pass if user is owner in MUC service (access_admin option)
true; true;
check_password(_Affiliation, Els, StateData) -> check_password(_ServiceAffiliation, Els, StateData) ->
case (StateData#state.config)#config.password_protected of case (StateData#state.config)#config.password_protected of
false -> false ->
true; true;