25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +01:00

Gracefully process malformed passwords during password change

This commit is contained in:
Evgeniy Khramtsov 2017-05-11 17:15:23 +03:00
parent 31a3cc7b10
commit 9fe16a29e1

View File

@ -289,6 +289,9 @@ try_set_password(User, Server, Password, #iq{lang = Lang, meta = M} = IQ) ->
xmpp:make_error(IQ, xmpp:err_not_allowed(Txt, Lang)); xmpp:make_error(IQ, xmpp:err_not_allowed(Txt, Lang));
{error, invalid_jid} -> {error, invalid_jid} ->
xmpp:make_error(IQ, xmpp:err_jid_malformed()); xmpp:make_error(IQ, xmpp:err_jid_malformed());
{error, invalid_password} ->
Txt = <<"Incorrect password">>,
xmpp:make_error(IQ, xmpp:err_not_allowed(Txt, Lang));
Err -> Err ->
?ERROR_MSG("failed to register user ~s@~s: ~p", ?ERROR_MSG("failed to register user ~s@~s: ~p",
[User, Server, Err]), [User, Server, Err]),