mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Make anonymous auth not override sasl mechaninsm offered by other modules
This stop overriding store_type when anonymous is enabled with other auth modules, we don't really need that since anonymous is not taking passwords anyway, and this was disabling scram mechanisms. This fixes issue #2803.
This commit is contained in:
parent
a9ed26e484
commit
d8d9ef32ad
@ -197,8 +197,12 @@ plain_password_required(Server) ->
|
||||
|
||||
-spec store_type(binary()) -> plain | scram | external.
|
||||
store_type(Server) ->
|
||||
case auth_modules(Server) of
|
||||
[ejabberd_auth_anonymous] -> external;
|
||||
Modules ->
|
||||
lists:foldl(
|
||||
fun(_, external) -> external;
|
||||
fun(ejabberd_auth_anonymous, Type) -> Type;
|
||||
(_, external) -> external;
|
||||
(M, scram) ->
|
||||
case M:store_type(Server) of
|
||||
external -> external;
|
||||
@ -206,7 +210,8 @@ store_type(Server) ->
|
||||
end;
|
||||
(M, plain) ->
|
||||
M:store_type(Server)
|
||||
end, plain, auth_modules(Server)).
|
||||
end, plain, Modules)
|
||||
end.
|
||||
|
||||
-spec check_password(binary(), binary(), binary(), binary()) -> boolean().
|
||||
check_password(User, AuthzId, Server, Password) ->
|
||||
|
Loading…
Reference in New Issue
Block a user