Catching errors where we are passing invalid attributes

We need to pass :task down for some functionality in pro.
while the error is valid we really shouldnt be passing the task all the way down if its blank but we need
the check there or we will end up with the same problem with pro.
bug/bundler_fix
darkbushido 2017-04-10 15:05:53 -05:00
parent b25cdd2d3b
commit 099cf87e54
No known key found for this signature in database
GPG Key ID: 3922EB70FB80E8DD
2 changed files with 5 additions and 1 deletions

View File

@ -170,7 +170,7 @@ module Msf::DBManager::Host
else
host = addr
end
# Truncate the info field at the maximum field length
if opts[:info]
opts[:info] = opts[:info][0,65535]
@ -196,6 +196,8 @@ module Msf::DBManager::Host
unless host.attribute_locked?(k.to_s)
host[k] = v.to_s.gsub(/[\x00-\x1f]/n, '')
end
elsif v.blank?
# eating blank attributes that dont exist
else
dlog("Unknown attribute for ::Mdm::Host: #{k}")
end

View File

@ -92,6 +92,8 @@ module Msf::DBManager::Service
opts.each { |k,v|
if (service.attribute_names.include?(k.to_s))
service[k] = ((v and k == :name) ? v.to_s.downcase : v)
elsif v.blank?
# eating blank attributes that dont exist
else
dlog("Unknown attribute for Service: #{k}")
end