Skip to content

Commit c35dc4d

Browse files
committed
Extract query params separately
Prevents stomping on data
1 parent c79fe73 commit c35dc4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/auxiliary/scanner/http/http_traversal.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ def ini_request(uri)
143143
# We expect it to regex the GET parameters:
144144
# 'page=1&id=3&note=whatever'
145145
# And then let queryparse() to handle the rest
146-
data = uri.match(/\?(\w+=.+&*)$/)
147-
req['vars_get'] = queryparse(data[1]) if not data.nil?
146+
query_params = uri.match(/\?(\w+=.+&*)$/)
147+
req['vars_get'] = queryparse(query_params[1]) if query_params
148148
when 'POST'
149149
req['vars_post'] = queryparse(data) if not data.empty?
150150
when 'PUT'

0 commit comments

Comments
 (0)