mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
Replace jlib:nodeprep/1 by exmpp_stringprep:nodeprep/1 and change the
error handling. PR: EJABP-1 SVN Revision: 1619
This commit is contained in:
parent
c0e4af9ac0
commit
129b0e99cf
@ -12,6 +12,9 @@
|
||||
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.
|
||||
|
||||
2008-10-09 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
|
||||
|
||||
* src/ejabberd_c2s.erl: Fix handling of unauthenticated stanzas which
|
||||
|
@ -154,13 +154,14 @@ normalize_hosts(Hosts) ->
|
||||
normalize_hosts([], PrepHosts) ->
|
||||
lists:reverse(PrepHosts);
|
||||
normalize_hosts([Host|Hosts], PrepHosts) ->
|
||||
case jlib:nodeprep(Host) of
|
||||
error ->
|
||||
try
|
||||
PrepHost = exmpp_stringprep:nodeprep(Host),
|
||||
normalize_hosts(Hosts, [PrepHost|PrepHosts])
|
||||
catch
|
||||
_ ->
|
||||
?ERROR_MSG("Can't load config file: "
|
||||
"invalid host name [~p]", [Host]),
|
||||
exit("invalid hostname");
|
||||
PrepHost ->
|
||||
normalize_hosts(Hosts, [PrepHost|PrepHosts])
|
||||
exit("invalid hostname")
|
||||
end.
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user