FQDN not recognized by util.rb/convert with Ruby 2.7.2
-- Similar issue as #325 but the update to util.rb is still throwing error.
-- I tried with ruby 2.6.3 as well and error is still thrown.
Expected Behavior
Site data that contains FQDN and IPs is loaded with no issues. These sites are used to scan externally facing assets.
Current Behavior
Sites that assets include FQDN return error
Steps to Reproduce (for bugs)
Load site data with assets listed as FQDN with Ruby 2.7.2 (or 2.6.3)
Ruby code that reproduces the issue:
Below is just a segment of the script where it fails.
puts "Enter string to filter sites based on (ex. STG, DEV) or full site name: "
userSearch = gets.chomp
if sites.length == 0
puts "There are no active sites"
else
sites.each do |site|
if site.name.include? userSearch
s = Site.load(nsc, site.id) ##this is where it fails if the site has assets defined as FQDN
puts "Site ID: #{site.id}"
puts "Site Name: #{site.name}"
puts "Template ID: #{s.scan_template_id}"
puts "Template Name: #{s.scan_template_name}"
puts "Schedule: #{s.schedules}"
puts "\n"
end
end
Context
I am trying to be able to update sites templates, scan schedules, etc and a variety of our sites have FQDNs in their asset listings. So for sites that don't have this it works fine, but whenever one I filter on does, it causes an error.
Your Environment
Nexpose gem version: 7.2.1
Ruby version: ruby-2.7.2
Operating System and version: CentOS 7.9.2009
Nexpose product version: InsightVM console version 6.6.61
I just released version 7.3.0 to catch up all the changes since 7.2.1. I think this issue should be fixed with that since it been sitting on the master branch for a while.
FQDN not recognized by util.rb/convert with Ruby 2.7.2 -- Similar issue as #325 but the update to util.rb is still throwing error. -- I tried with ruby 2.6.3 as well and error is still thrown.
Expected Behavior
Site data that contains FQDN and IPs is loaded with no issues. These sites are used to scan externally facing assets.
Current Behavior
Sites that assets include FQDN return error
Steps to Reproduce (for bugs)
Load site data with assets listed as FQDN with Ruby 2.7.2 (or 2.6.3)
Ruby code that reproduces the issue: Below is just a segment of the script where it fails.
puts "Enter string to filter sites based on (ex. STG, DEV) or full site name: " userSearch = gets.chomp
if sites.length == 0 puts "There are no active sites" else sites.each do |site| if site.name.include? userSearch s = Site.load(nsc, site.id) ##this is where it fails if the site has assets defined as FQDN puts "Site ID: #{site.id}" puts "Site Name: #{site.name}" puts "Template ID: #{s.scan_template_id}" puts "Template Name: #{s.scan_template_name}" puts "Schedule: #{s.schedules}" puts "\n" end end
Context
I am trying to be able to update sites templates, scan schedules, etc and a variety of our sites have FQDNs in their asset listings. So for sites that don't have this it works fine, but whenever one I filter on does, it causes an error.
Your Environment