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

Replace jlib:nameprep/1 by exmpp_stringprep:nameprep/1 and change the

error handling.

PR:		EJABP-1

SVN Revision: 1625
This commit is contained in:
Jean-Sébastien Pédron 2008-10-10 14:57:44 +00:00
parent 3adb238b31
commit 0244963935
2 changed files with 17 additions and 15 deletions

View File

@ -9,9 +9,9 @@
exmpp_jid:jid_to_list/3. Thanks to Pablo Polvorin! exmpp_jid:jid_to_list/3. Thanks to Pablo Polvorin!
* src/ejabberd_s2s_in.erl (wait_for_feature_request/2), * src/ejabberd_s2s_in.erl (wait_for_feature_request/2),
src/ejabberd_router.erl (register_route/2, unregister_route/1): src/ejabberd_router.erl (register_route/2, unregister_route/1),
Replace jlib:nameprep/1 by exmpp_stringprep:nameprep/1 and change the src/ejabberd_ctl.erl (process/1): Replace jlib:nameprep/1 by
error handling. exmpp_stringprep:nameprep/1 and change the error handling.
* src/ejabberd_config.erl (normalize_hosts/2): Replace jlib:nodeprep/1 * src/ejabberd_config.erl (normalize_hosts/2): Replace jlib:nodeprep/1
by exmpp_stringprep:nodeprep/1 and change the error handling. by exmpp_stringprep:nodeprep/1 and change the error handling.
@ -28,6 +28,7 @@
* src/mod_roster_odbc.erl (user_roster_subscribe_jid/3): Fix a bug * src/mod_roster_odbc.erl (user_roster_subscribe_jid/3): Fix a bug
where the wrong module was called (jlib instead of exmpp_jid). where the wrong module was called (jlib instead of exmpp_jid).
* src/ejabberd_ctl.erl (process/1):
2008-10-09 Jean-Sébastien Pédron <js.pedron@meetic-corp.com> 2008-10-09 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
* src/ejabberd_c2s.erl: Fix handling of unauthenticated stanzas which * src/ejabberd_c2s.erl: Fix handling of unauthenticated stanzas which

View File

@ -243,19 +243,20 @@ process(["delete-old-messages", Days]) ->
end; end;
process(["vhost", H | Args]) -> process(["vhost", H | Args]) ->
case jlib:nameprep(H) of try
false -> Host = exmpp_stringprep:nameprep(H),
case ejabberd_hooks:run_fold(
ejabberd_ctl_process, Host, false, [Host, Args]) of
false ->
print_vhost_usage(Host),
?STATUS_USAGE;
Status ->
Status
end
catch
_ ->
?PRINT("Bad hostname: ~p~n", [H]), ?PRINT("Bad hostname: ~p~n", [H]),
?STATUS_ERROR; ?STATUS_ERROR
Host ->
case ejabberd_hooks:run_fold(
ejabberd_ctl_process, Host, false, [Host, Args]) of
false ->
print_vhost_usage(Host),
?STATUS_USAGE;
Status ->
Status
end
end; end;
process(Args) -> process(Args) ->