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

Gracefully process malformed passwords during registration

This commit is contained in:
Evgeniy Khramtsov 2017-05-11 17:09:26 +03:00
parent a8dc5f80d1
commit 31a3cc7b10

View File

@ -336,6 +336,9 @@ try_register(User, Server, Password, SourceRaw, Lang) ->
{error, xmpp:err_conflict(Txt, Lang)};
{error, invalid_jid} ->
{error, xmpp:err_jid_malformed()};
{error, invalid_password} ->
Txt = <<"Incorrect password">>,
{error, xmpp:err_not_allowed(Txt, Lang)};
{error, not_allowed} ->
{error, xmpp:err_not_allowed()};
{error, too_many_users} ->