From 49d3b7ec1de954cae7fb87cfd74267dfb9dcdf51 Mon Sep 17 00:00:00 2001 From: Badlop Date: Fri, 4 Nov 2016 17:28:28 +0100 Subject: [PATCH] Throw error if room name or host has invalid characters (#1360) --- src/mod_muc_admin.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod_muc_admin.erl b/src/mod_muc_admin.erl index c9da1c66c..bd1c55f66 100644 --- a/src/mod_muc_admin.erl +++ b/src/mod_muc_admin.erl @@ -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,