]> granicus.if.org Git - ejabberd/commitdiff
Fix auth verification in ejabberd_xmlrpc (thanks to Vicis)
authorBadlop <badlop@process-one.net>
Thu, 2 Jan 2014 15:10:19 +0000 (16:10 +0100)
committerBadlop <badlop@process-one.net>
Thu, 2 Jan 2014 15:10:19 +0000 (16:10 +0100)
src/ejabberd_xmlrpc.erl

index 40223f77e9173c1332b3690ce45ecc816dcd5434..acda0c7f9c58a86f9bc558d7334b61998dc6be32 100644 (file)
@@ -345,8 +345,10 @@ build_fault_response(Code, ParseString, ParseArgs) ->
 do_command(AccessCommands, Auth, Command, AttrL, ArgsF,
           ResultF) ->
     ArgsFormatted = format_args(AttrL, ArgsF),
+    {UserT, ServerT, PasswordT} = Auth,
+    AuthBin = {list_to_binary(UserT), list_to_binary(ServerT), list_to_binary(PasswordT)},
     Result =
-       ejabberd_commands:execute_command(AccessCommands, Auth,
+       ejabberd_commands:execute_command(AccessCommands, AuthBin,
                                          Command, ArgsFormatted),
     ResultFormatted = format_result(Result, ResultF),
     {command_result, ResultFormatted}.