* src/cyrsasl.erl: Bugfix: anonymous authentication was always
enabled SVN Revision: 555
This commit is contained in:
parent
bd4c18516c
commit
66149f862f
|
@ -1,3 +1,8 @@
|
||||||
|
2006-04-28 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
|
* src/cyrsasl.erl: Bugfix: anonymous authentication was always
|
||||||
|
enabled
|
||||||
|
|
||||||
2006-04-27 Mickael Remond <mickael.remond@process-one.net>
|
2006-04-27 Mickael Remond <mickael.remond@process-one.net>
|
||||||
|
|
||||||
* src/ejabberd_ctl.erl: The status now only returns "started" if
|
* src/ejabberd_ctl.erl: The status now only returns "started" if
|
||||||
|
|
|
@ -104,16 +104,21 @@ server_new(Service, ServerFQDN, UserRealm, SecFlags,
|
||||||
check_password = CheckPassword}.
|
check_password = CheckPassword}.
|
||||||
|
|
||||||
server_start(State, Mech, ClientIn) ->
|
server_start(State, Mech, ClientIn) ->
|
||||||
case ets:lookup(sasl_mechanism, Mech) of
|
case lists:member(Mech, listmech(State#sasl_state.myname)) of
|
||||||
[#sasl_mechanism{module = Module}] ->
|
true ->
|
||||||
{ok, MechState} = Module:mech_new(
|
case ets:lookup(sasl_mechanism, Mech) of
|
||||||
State#sasl_state.myname,
|
[#sasl_mechanism{module = Module}] ->
|
||||||
State#sasl_state.get_password,
|
{ok, MechState} = Module:mech_new(
|
||||||
State#sasl_state.check_password),
|
State#sasl_state.myname,
|
||||||
server_step(State#sasl_state{mech_mod = Module,
|
State#sasl_state.get_password,
|
||||||
mech_state = MechState},
|
State#sasl_state.check_password),
|
||||||
ClientIn);
|
server_step(State#sasl_state{mech_mod = Module,
|
||||||
_ ->
|
mech_state = MechState},
|
||||||
|
ClientIn);
|
||||||
|
_ ->
|
||||||
|
{error, "no-mechanism"}
|
||||||
|
end;
|
||||||
|
false ->
|
||||||
{error, "no-mechanism"}
|
{error, "no-mechanism"}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -140,5 +145,5 @@ server_step(State, ClientIn) ->
|
||||||
filter_anonymous(Host, Mechs) ->
|
filter_anonymous(Host, Mechs) ->
|
||||||
case ejabberd_auth_anonymous:is_sasl_anonymous_enabled(Host) of
|
case ejabberd_auth_anonymous:is_sasl_anonymous_enabled(Host) of
|
||||||
true -> Mechs;
|
true -> Mechs;
|
||||||
false -> Mechs -- "ANONYMOUS"
|
false -> Mechs -- ["ANONYMOUS"]
|
||||||
end.
|
end.
|
||||||
|
|
Loading…
Reference in New Issue