* src/ejabberd_auth.erl: Password is undefined when using digest

SVN Revision: 1908
This commit is contained in:
Badlop 2009-02-21 14:41:29 +00:00
parent 2df100213b
commit a5f70e15a2
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2009-02-21 Badlop <badlop@process-one.net>
* src/ejabberd_auth.erl: Password is undefined when using digest
2009-02-20 Pablo Polvorin <pablo.polvorin@process-one.net>
* src/mod_offline_odbc.erl, src/mod_privacy_odbc.erl,

View File

@ -138,13 +138,16 @@ check_password_with_authmodule(User, Server, Password)
%% @spec (User, Server, Password, StreamID, Digest) -> {true, AuthModule} | false
%% User = string()
%% Server = string()
%% Password = string()
%% Password = string() | undefined
%% StreamID = string()
%% Digest = string()
%% Digest = string() | undefined
%% AuthModule = authmodule()
%% The password is 'undefined' if the client
%% authenticates using the digest method as defined in
%% XEP-0078: Non-SASL Authentication
check_password_with_authmodule(User, Server, Password, StreamID, Digest)
when is_list(User), is_list(Server), is_list(Password),
when is_list(User), is_list(Server), (is_list(Password) orelse Password == 'undefined'),
is_list(StreamID), (is_list(Digest) orelse Digest == 'undefined')->
Res = lists:dropwhile(
fun(M) ->