25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-24 17:29:28 +01:00

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

SVN Revision: 2395
This commit is contained in:
Badlop 2009-07-27 09:37:24 +00:00
parent 620a50223c
commit e6205e8f26

View File

@ -756,14 +756,14 @@ process_iq_register_set(Host, From, SubEl, Lang) ->
{error, 'bad-request'}; {error, 'bad-request'};
_ -> _ ->
case lists:keysearch("nick", 1, XData) of case lists:keysearch("nick", 1, XData) of
false -> {value, {_, [Nick]}} ->
iq_set_register_info(Host, From, list_to_binary(Nick), Lang);
_ ->
ErrText = "You must fill in field \"Nickname\" in the form", ErrText = "You must fill in field \"Nickname\" in the form",
Err = exmpp_stanza:error(SubEl#xmlel.ns, Err = exmpp_stanza:error(SubEl#xmlel.ns,
'not-acceptable', 'not-acceptable',
{Lang, translate:translate(Lang,ErrText)}), {Lang, translate:translate(Lang,ErrText)}),
{error, Err}; {error, Err}
{value, {_, [Nick]}} ->
iq_set_register_info(Host, From, list_to_binary(Nick), Lang)
end end
end; end;
_ -> _ ->