From 7f75aa0372042b1878652e4dbf8b2ddd77362bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Thu, 10 Mar 2016 23:53:33 +0100 Subject: [PATCH] Fix unicode character handling in command arguments Many thanks to Krzysztof Grochocki for finding this fix. This fixes issue #153. --- mod_rest/src/mod_rest.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod_rest/src/mod_rest.erl b/mod_rest/src/mod_rest.erl index b82b7b5..caa1bd8 100644 --- a/mod_rest/src/mod_rest.erl +++ b/mod_rest/src/mod_rest.erl @@ -87,7 +87,7 @@ maybe_post_request(<<$<,_/binary>> = Data, Host, ClientIp) -> end; maybe_post_request(Data, Host, _ClientIp) -> ?INFO_MSG("Data: ~p", [Data]), - Args = split_line(binary_to_list(Data)), + Args = split_line(unicode:characters_to_list(Data, utf8)), AccessCommands = get_option_access(Host), case ejabberd_ctl:process2(Args, AccessCommands) of {"", ?STATUS_SUCCESS} ->