Skip to content

Commit 6326cac

Browse files
committed
Fixing nil safe issue
1 parent 7e9f52d commit 6326cac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/exploits/windows/http/pgadmin_binary_path_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def get_version
102102
res = send_request_cgi('uri' => normalize_uri(target_uri.path, 'browser/'), 'keep_cookies' => true)
103103
end
104104
html_document = res.get_html_document
105-
return unless html_document.xpath('//title').text == 'pgAdmin 4'
105+
return unless html_document && html_document.xpath('//title').text == 'pgAdmin 4'
106106

107107
# there's multiple links in the HTML that expose the version number in the [X]XYYZZ,
108108
# see: https://github.com/pgadmin-org/pgadmin4/blob/053b1e3d693db987d1c947e1cb34daf842e387b7/web/version.py#L27

0 commit comments

Comments
 (0)