summaryrefslogtreecommitdiff
path: root/src/ejabberd_http_bind.erl
diff options
context:
space:
mode:
authorPaweł Chmielowski <pchmielowski@process-one.net>2015-09-22 15:33:31 +0200
committerPaweł Chmielowski <pchmielowski@process-one.net>2015-09-22 15:42:57 +0200
commite28934497261e3d8d0feef8d54af9af43cee8e85 (patch)
treed12a5e7bcb4d6d12d7fdf4e8c31e8b3595290787 /src/ejabberd_http_bind.erl
parentImprove external module configuration management (EJAB-1746) (diff)
Nameprep host name passed to http-bind before using in (EJAB-1658)
Diffstat (limited to 'src/ejabberd_http_bind.erl')
-rw-r--r--src/ejabberd_http_bind.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ejabberd_http_bind.erl b/src/ejabberd_http_bind.erl
index 4277f4c5..42be5256 100644
--- a/src/ejabberd_http_bind.erl
+++ b/src/ejabberd_http_bind.erl
@@ -220,8 +220,9 @@ process_request(Data, IP, HOpts) ->
"dressing' xmlns='",
(?NS_HTTP_BIND)/binary, "'/>">>};
XmppDomain ->
+ NXmppDomain = jlib:nameprep(XmppDomain),
Sid = p1_sha:sha(term_to_binary({now(), make_ref()})),
- case start(XmppDomain, Sid, <<"">>, IP, HOpts) of
+ case start(NXmppDomain, Sid, <<"">>, IP, HOpts) of
{error, _} ->
{500, ?HEADER,
<<"<body type='terminate' condition='internal-se"
@@ -229,7 +230,7 @@ process_request(Data, IP, HOpts) ->
(?NS_HTTP_BIND)/binary,
"'>Internal Server Error</body>">>};
{ok, Pid} ->
- handle_session_start(Pid, XmppDomain, Sid, Rid, Attrs,
+ handle_session_start(Pid, NXmppDomain, Sid, Rid, Attrs,
Payload, PayloadSize, IP)
end
end;