Fix unicode character handling in command arguments

Many thanks to Krzysztof Grochocki for finding this fix.

This fixes issue #153.
This commit is contained in:
Paweł Chmielowski 2016-03-10 23:53:33 +01:00
parent 32fd4c4d9c
commit 7f75aa0372
1 changed files with 1 additions and 1 deletions

View File

@ -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} ->