mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Verify username provided in registration web form
This commit is contained in:
parent
493b664f19
commit
e690afc33b
@ -536,6 +536,11 @@ form_del_get(Host, Lang) ->
|
||||
%% {error, not_allowed} |
|
||||
%% {error, invalid_jid}
|
||||
register_account(Username, Host, Password) ->
|
||||
case jlib:make_jid(Username, Host, "") of
|
||||
error -> {error, invalid_jid};
|
||||
_ -> register_account2(Username, Host, Password)
|
||||
end.
|
||||
register_account2(Username, Host, Password) ->
|
||||
case ejabberd_auth:try_register(Username, Host, Password) of
|
||||
{atomic, Res} ->
|
||||
{success, Res, {Username, Host, Password}};
|
||||
|
Loading…
Reference in New Issue
Block a user