Fixed issue with malformed JSON response (missing }). No using hash.to_json to send response.

This commit is contained in:
antisnatchor
2012-04-15 11:56:00 +01:00
parent 364575592a
commit 8feef887b9

View File

@@ -58,7 +58,9 @@ module BeEF
BeEF::Core::Logger.instance.register('Authentication', "User with ip #{request.ip} has failed to authenticate in the application.")
halt 401
else
'{"success":"true","token":"' + config.get('beef.api_token') + '"'
{ "success" => true,
"token" => "#{config.get('beef.api_token')}"
}.to_json
end
rescue Exception => e
error 400