From 31a3cc7b10c7f435d1aca31ce3b2c87896a55ec5 Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Thu, 11 May 2017 17:09:26 +0300 Subject: [PATCH] Gracefully process malformed passwords during registration --- src/mod_register.erl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mod_register.erl b/src/mod_register.erl index d477f149a..a213a2441 100644 --- a/src/mod_register.erl +++ b/src/mod_register.erl @@ -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} ->