Skip to content
This repository was archived by the owner on Oct 22, 2020. It is now read-only.

Commit f051ba8

Browse files
committed
Add #upload_request_params
1 parent 590b18c commit f051ba8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/wpxf/wordpress/shell_upload.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ def expected_upload_response_code
6060
200
6161
end
6262

63+
# @return [Hash] the query string parameters to use when submitting the upload request.
64+
def upload_request_params
65+
nil
66+
end
67+
6368
# Run the module.
6469
# @return [Boolean] true if successful.
6570
def run
@@ -98,7 +103,7 @@ def payload_name_length
98103

99104
def upload_payload(builder)
100105
builder.create do |body|
101-
@upload_result = execute_post_request(url: uploader_url, body: body, cookie: @session_cookie)
106+
@upload_result = execute_post_request(url: uploader_url, params: upload_request_params, body: body, cookie: @session_cookie)
102107
end
103108

104109
if @upload_result.nil? || @upload_result.timed_out?

0 commit comments

Comments
 (0)