Skip to content

Commit 63ed562

Browse files
committed
Land rapid7#7395, Ninja Forms module update
2 parents b30e380 + f60d575 commit 63ed562

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

modules/exploits/unix/webapp/wp_ninja_forms_unauthenticated_file_upload.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ def enable_v3_functionality
6969
)
7070

7171
unless res && res.code == 200
72-
fail_with(Failure::Unreachable, 'Failed to enable the vulnerable V3 functionality')
72+
if res
73+
fail_with(Failure::Unreachable, "Failed to enable the vulnerable V3 functionality. Server returned: #{res.code}, should be 200.")
74+
else
75+
fail_with(Failure::Unreachable, 'Connection timed out.')
76+
end
7377
end
7478

7579
vprint_good 'Enabled V3 functionality'
@@ -85,6 +89,8 @@ def disable_v3_functionality
8589

8690
if res && res.code == 200
8791
vprint_good 'Disabled V3 functionality'
92+
elsif !res
93+
print_error('Connection timed out while disabling V3 functionality')
8894
else
8995
print_error 'Failed to disable the vulnerable V3 functionality'
9096
end

0 commit comments

Comments
 (0)