mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
* src/ejabberd_auth.erl: Fixed broken multiple connection with
anonymous login problem (EJAB-107). * src/ejabberd_auth_anonymous.erl: Likewise. SVN Revision: 579
This commit is contained in:
parent
b80002a8bb
commit
bd276f0b07
@ -1,3 +1,9 @@
|
|||||||
|
2006-06-13 Mickael Remond <mickael.remond@process-one.net>
|
||||||
|
|
||||||
|
* src/ejabberd_auth.erl: Fixed broken multiple connection with
|
||||||
|
anonymous login problem.
|
||||||
|
* src/ejabberd_auth_anonymous.erl: Likewise.
|
||||||
|
|
||||||
2006-06-07 Mickael Remond <mickael.remond@process-one.net>
|
2006-06-07 Mickael Remond <mickael.remond@process-one.net>
|
||||||
|
|
||||||
* src/mod_pubsub/mod_pubsub.erl: Support for pubsub node creation
|
* src/mod_pubsub/mod_pubsub.erl: Support for pubsub node creation
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
get_password/2,
|
get_password/2,
|
||||||
get_password_s/2,
|
get_password_s/2,
|
||||||
is_user_exists/2,
|
is_user_exists/2,
|
||||||
|
is_user_exists_in_other_modules/3,
|
||||||
remove_user/2,
|
remove_user/2,
|
||||||
remove_user/3,
|
remove_user/3,
|
||||||
plain_password_required/1,
|
plain_password_required/1,
|
||||||
@ -130,6 +131,14 @@ is_user_exists(User, Server) ->
|
|||||||
M:is_user_exists(User, Server)
|
M:is_user_exists(User, Server)
|
||||||
end, auth_modules(Server)).
|
end, auth_modules(Server)).
|
||||||
|
|
||||||
|
%% Check if the user exists in all authentications module except the module
|
||||||
|
%% passed as parameter
|
||||||
|
is_user_exists_in_other_modules(Module, User, Server) ->
|
||||||
|
lists:any(
|
||||||
|
fun(M) ->
|
||||||
|
M:is_user_exists(User, Server)
|
||||||
|
end, auth_modules(Server)--[Module]).
|
||||||
|
|
||||||
remove_user(User, Server) ->
|
remove_user(User, Server) ->
|
||||||
lists:foreach(
|
lists:foreach(
|
||||||
fun(M) ->
|
fun(M) ->
|
||||||
|
@ -149,7 +149,8 @@ check_password(User, Server, Password) ->
|
|||||||
check_password(User, Server, _Password, _StreamID, _Digest) ->
|
check_password(User, Server, _Password, _StreamID, _Digest) ->
|
||||||
%% We refuse login for registered accounts (They cannot logged but
|
%% We refuse login for registered accounts (They cannot logged but
|
||||||
%% they however are "reserved")
|
%% they however are "reserved")
|
||||||
case ejabberd_auth:is_user_exists(User, Server) of
|
case ejabberd_auth:is_user_exists_in_other_modules(?MODULE,
|
||||||
|
User, Server) of
|
||||||
true -> false;
|
true -> false;
|
||||||
false -> login(User, Server)
|
false -> login(User, Server)
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user