diff --git a/ChangeLog b/ChangeLog index 2613ee046..3f2bd450a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-02-21 Badlop + + * src/ejabberd_auth.erl: Password is undefined when using digest + 2009-02-20 Pablo Polvorin * src/mod_offline_odbc.erl, src/mod_privacy_odbc.erl, diff --git a/src/ejabberd_auth.erl b/src/ejabberd_auth.erl index 623fb7fd5..a90a2ad61 100644 --- a/src/ejabberd_auth.erl +++ b/src/ejabberd_auth.erl @@ -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) ->