Fix logic issue when processing HTTP requests

GSoC/Meterpreter_Web_Console
James Barnett 2018-07-28 15:23:56 -05:00
parent 37706e094d
commit 9e08bf6ec2
No known key found for this signature in database
GPG Key ID: 647983861A4EC5EA
1 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ module ResponseDataHelper
def json_to_hash(response_wrapper)
begin
body = process_response(response_wrapper)
if !body.nil? || !body.empty?
if !body.nil? && !body.empty?
parsed_body = JSON.parse(body, symbolize_names: true)
return parsed_body[:data]
end
@ -48,7 +48,7 @@ module ResponseDataHelper
if response_wrapper.expected
begin
body = process_response(response_wrapper)
if !body.nil? || !body.empty?
if !body.nil? && !body.empty?
parsed_body = JSON.parse(body).symbolize_keys
data = Array.wrap(parsed_body[:data])
rv = []