Throw error if room name or host has invalid characters (#1360)

This commit is contained in:
Badlop 2016-11-04 17:28:28 +01:00
parent 5e723bc90e
commit 49d3b7ec1d
1 changed files with 2 additions and 2 deletions

View File

@ -432,8 +432,8 @@ create_room(Name1, Host1, ServerHost) ->
create_room_with_opts(Name1, Host1, ServerHost, []).
create_room_with_opts(Name1, Host1, ServerHost, CustomRoomOpts) ->
Name = jid:nodeprep(Name1),
Host = jid:nodeprep(Host1),
true = (error /= (Name = jid:nodeprep(Name1))),
true = (error /= (Host = jid:nodeprep(Host1))),
%% Get the default room options from the muc configuration
DefRoomOpts = gen_mod:get_module_opt(ServerHost, mod_muc,