Skip to content

Commit 0f85fa2

Browse files
committed
Fix undefined method error
[FixRM rapid7#8331]
1 parent 8eeb66f commit 0f85fa2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/auxiliary/scanner/http/rails_mass_assignment.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def check_data(ip, parsed_data, base_params)
8787
'data' => datastore['METHOD'] == 'POST' ? query.to_query : datastore['DATA']
8888
}, 20)
8989

90-
if resp.code == 500
90+
if resp and resp.code == 500
9191
print_good("#{ip} - Possible attributes mass assignment in attribute #{param}[...] at #{datastore['PATH']}")
9292
report_web_vuln(
9393
:host => rhost,

0 commit comments

Comments
 (0)