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

mod_register_web: Choose the right error messages

This commit is contained in:
Holger Weiss 2016-02-29 00:39:57 +01:00
parent 6b126171da
commit 6d8c7232d8

View File

@ -282,9 +282,9 @@ form_new_post(Q) ->
case catch get_register_parameters(Q) of
[Username, Host, Password, Password, Id, Key] ->
form_new_post(Username, Host, Password, {Id, Key});
[_Username, _Password, _Password2, false, false] ->
[_Username, _Host, _Password, _Password2, false, false] ->
{error, passwords_not_identical};
[_Username, _Password, _Password2, Id, Key] ->
[_Username, _Host, _Password, _Password2, Id, Key] ->
ejabberd_captcha:check_captcha(Id, Key),
{error, passwords_not_identical};
_ -> {error, wrong_parameters}
@ -392,7 +392,7 @@ form_changepass_post(Q) ->
[Username, Host, PasswordOld, Password, Password] ->
try_change_password(Username, Host, PasswordOld,
Password);
[_Username, _PasswordOld, _Password, _Password2] ->
[_Username, _Host, _PasswordOld, _Password, _Password2] ->
{error, passwords_not_identical};
_ -> {error, wrong_parameters}
end.