25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Do not crash SIP authentication on SCRAMed passwords

This commit is contained in:
Evgeniy Khramtsov 2015-08-02 14:47:06 +03:00
parent dfe3082445
commit f377992232

View File

@ -263,8 +263,12 @@ check_auth(#sip{method = Method, hdrs = Hdrs, body = Body}, AuthHdr, _SIPSock) -
case ejabberd_auth:get_password_s(LUser, LServer) of
<<"">> ->
false;
Password ->
esip:check_auth(Auth, Method, Body, Password)
Password when is_binary(Password) ->
esip:check_auth(Auth, Method, Body, Password);
_ScramedPassword ->
?ERROR_MSG("unable to authenticate ~s@~s against SCRAM'ed "
"password", [LUser, LServer]),
false
end;
[] ->
false