diff --git a/ChangeLog b/ChangeLog index 997cedfe0..c0da44308 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,9 +9,9 @@ exmpp_jid:jid_to_list/3. Thanks to Pablo Polvorin! * src/ejabberd_s2s_in.erl (wait_for_feature_request/2), - src/ejabberd_router.erl (register_route/2, unregister_route/1): - Replace jlib:nameprep/1 by exmpp_stringprep:nameprep/1 and change the - error handling. + src/ejabberd_router.erl (register_route/2, unregister_route/1), + src/ejabberd_ctl.erl (process/1): Replace jlib:nameprep/1 by + exmpp_stringprep:nameprep/1 and change the error handling. * src/ejabberd_config.erl (normalize_hosts/2): Replace jlib:nodeprep/1 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 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 * src/ejabberd_c2s.erl: Fix handling of unauthenticated stanzas which diff --git a/src/ejabberd_ctl.erl b/src/ejabberd_ctl.erl index c66b93a38..adc54c44d 100644 --- a/src/ejabberd_ctl.erl +++ b/src/ejabberd_ctl.erl @@ -243,19 +243,20 @@ process(["delete-old-messages", Days]) -> end; process(["vhost", H | Args]) -> - case jlib:nameprep(H) of - false -> + try + 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]), - ?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 + ?STATUS_ERROR end; process(Args) ->