Skip to content

Commit c1c74a0

Browse files
committed
Do not fail on document creation
Since we attempt to create the document in multiple APIs, we want to avoid exiting on a failed creation attempt. This will allow us to retry the document creation on the next available API.
1 parent dc445ed commit c1c74a0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/exploits/multi/http/wso2_api_manager_file_upload_rce.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,10 @@ def create_document(api_id)
339339
'data' => doc_data.to_json
340340
)
341341

342-
fail_with(Failure::UnexpectedReply, 'Failed to create document') unless res&.code == 201
342+
unless res&.code == 201
343+
vprint_error("Failed to create document for API #{api_id}")
344+
return
345+
end
343346

344347
print_good('Document created successfully')
345348

0 commit comments

Comments
 (0)