Don't offer X-OAUTH2 if the only auth method enabled is Anonymous (#3209)

This commit is contained in:
Badlop 2020-04-27 20:03:07 +02:00
parent 6320dfd34e
commit 3db9459591
1 changed files with 1 additions and 1 deletions

View File

@ -386,7 +386,7 @@ sasl_mechanisms(Mechs, #{lserver := LServer} = State) ->
(<<"DIGEST-MD5">>) -> Type == plain;
(<<"SCRAM-SHA-1">>) -> Type /= external;
(<<"PLAIN">>) -> true;
(<<"X-OAUTH2">>) -> true;
(<<"X-OAUTH2">>) -> [ejabberd_auth_anonymous] /= ejabberd_auth:auth_modules(LServer);
(<<"EXTERNAL">>) -> maps:get(tls_verify, State, false);
(_) -> false
end, Mechs -- Mechs1).