diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2015-08-02 14:47:06 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2015-08-02 14:47:45 +0300 |
commit | f37799223209e428310017829129dbf7f986bb1e (patch) | |
tree | 58283f5dd0be3af74fae7a8806cbb049681356f9 /src/mod_sip.erl | |
parent | dfe30824455a77ffad4b7739e5b6dad58eef8d9d (diff) |
Do not crash SIP authentication on SCRAMed passwords
Diffstat (limited to 'src/mod_sip.erl')
-rw-r--r-- | src/mod_sip.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mod_sip.erl b/src/mod_sip.erl index 7e7d2f307..4827e0c3b 100644 --- a/src/mod_sip.erl +++ b/src/mod_sip.erl @@ -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 |