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
|
jlib:nameprep/1 by exmpp_stringprep:nameprep/1 and change the error
|
||||||
handling.
|
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>
|
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
|
||||||
|
@ -154,13 +154,14 @@ normalize_hosts(Hosts) ->
|
|||||||
normalize_hosts([], PrepHosts) ->
|
normalize_hosts([], PrepHosts) ->
|
||||||
lists:reverse(PrepHosts);
|
lists:reverse(PrepHosts);
|
||||||
normalize_hosts([Host|Hosts], PrepHosts) ->
|
normalize_hosts([Host|Hosts], PrepHosts) ->
|
||||||
case jlib:nodeprep(Host) of
|
try
|
||||||
error ->
|
PrepHost = exmpp_stringprep:nodeprep(Host),
|
||||||
|
normalize_hosts(Hosts, [PrepHost|PrepHosts])
|
||||||
|
catch
|
||||||
|
_ ->
|
||||||
?ERROR_MSG("Can't load config file: "
|
?ERROR_MSG("Can't load config file: "
|
||||||
"invalid host name [~p]", [Host]),
|
"invalid host name [~p]", [Host]),
|
||||||
exit("invalid hostname");
|
exit("invalid hostname")
|
||||||
PrepHost ->
|
|
||||||
normalize_hosts(Hosts, [PrepHost|PrepHosts])
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user