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

Commit 3c08211

Browse files
committed
Force follow_http_redirect when getting form
1 parent 9b9e052 commit 3c08211

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

modules/auxiliary/wp_front_end_profile_privilege_escalation.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,18 @@ def profile_form_url
5252
normalize_uri(full_uri, datastore['profile_form_path'])
5353
end
5454

55+
def fetch_profile_form(cookie)
56+
res = nil
57+
58+
scoped_option_change('follow_http_redirection', true) do
59+
res = execute_get_request(url: profile_form_url, cookie: cookie)
60+
end
61+
62+
res
63+
end
64+
5565
def form_fields_with_default_values(cookie)
56-
res = execute_get_request(url: profile_form_url, cookie: cookie)
66+
res = fetch_profile_form(cookie)
5767
return nil unless res && res.code == 200
5868

5969
fields = {}

0 commit comments

Comments
 (0)