24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-18 22:15:20 +02:00

Fix error when nick registration stanza doesn't contain Value.

SVN Revision: 2394
This commit is contained in:
Badlop 2009-07-27 09:36:49 +00:00
parent 9d9fca5e19
commit 1262b0e353

View File

@ -742,11 +742,11 @@ process_iq_register_set(Host, From, SubEl, Lang) ->
{error, ?ERR_BAD_REQUEST}; {error, ?ERR_BAD_REQUEST};
_ -> _ ->
case lists:keysearch("nick", 1, XData) of case lists:keysearch("nick", 1, XData) of
false -> {value, {_, [Nick]}} when Nick /= "" ->
iq_set_register_info(Host, From, Nick, Lang);
_ ->
ErrText = "You must fill in field \"Nickname\" in the form", ErrText = "You must fill in field \"Nickname\" in the form",
{error, ?ERRT_NOT_ACCEPTABLE(Lang, ErrText)}; {error, ?ERRT_NOT_ACCEPTABLE(Lang, ErrText)}
{value, {_, [Nick]}} ->
iq_set_register_info(Host, From, Nick, Lang)
end end
end; end;
_ -> _ ->