Skip to content

Commit 9f80511

Browse files
committed
Properly implement normalize_uri
1 parent 7fad269 commit 9f80511

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/auxiliary/scanner/http/dolibarr_login.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def initialize(info = {})
4141
def get_sid_token
4242
res = send_request_raw({
4343
'method' => 'GET',
44-
'uri' => @uri.path
44+
'uri' => normalize_uri(@uri.path)
4545
})
4646

4747
return [nil, nil] if not (res and res.headers['Set-Cookie'])
@@ -74,7 +74,7 @@ def do_login(user, pass)
7474
begin
7575
res = send_request_cgi({
7676
'method' => 'POST',
77-
'uri' => "#{@uri.path}index.php",
77+
'uri' => normalize_uri("#{@uri.path}index.php"),
7878
'cookie' => sid,
7979
'vars_post' => {
8080
'token' => token,
@@ -117,7 +117,7 @@ def do_login(user, pass)
117117
end
118118

119119
def run
120-
@uri = normalize_uri(target_uri.path)
120+
@uri = target_uri.path
121121
@uri.path << "/" if @uri.path[-1, 1] != "/"
122122
@peer = "#{rhost}:#{rport}"
123123

0 commit comments

Comments
 (0)