mirror of
https://github.com/processone/ejabberd
synced 2025-10-06 03:50:15 +02:00
Throw error if room name or host has invalid characters (#1360)
This commit is contained in:
parent
5e723bc90e
commit
49d3b7ec1d
1 changed files with 2 additions and 2 deletions
|
@ -432,8 +432,8 @@ create_room(Name1, Host1, ServerHost) ->
|
||||||
create_room_with_opts(Name1, Host1, ServerHost, []).
|
create_room_with_opts(Name1, Host1, ServerHost, []).
|
||||||
|
|
||||||
create_room_with_opts(Name1, Host1, ServerHost, CustomRoomOpts) ->
|
create_room_with_opts(Name1, Host1, ServerHost, CustomRoomOpts) ->
|
||||||
Name = jid:nodeprep(Name1),
|
true = (error /= (Name = jid:nodeprep(Name1))),
|
||||||
Host = jid:nodeprep(Host1),
|
true = (error /= (Host = jid:nodeprep(Host1))),
|
||||||
|
|
||||||
%% Get the default room options from the muc configuration
|
%% Get the default room options from the muc configuration
|
||||||
DefRoomOpts = gen_mod:get_module_opt(ServerHost, mod_muc,
|
DefRoomOpts = gen_mod:get_module_opt(ServerHost, mod_muc,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue