Skip to content

Commit de0c4c0

Browse files
committed
Allow update of host workspace
1 parent 52b8f40 commit de0c4c0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/msf/core/db_manager/host.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,12 @@ def report_host(opts)
270270
end
271271

272272
def update_host(opts)
273-
# TODO: remove unneeded workspace from opts until it's not automatically added to remote requests
274-
opts.delete(:workspace)
273+
# process workspace string for update if included in opts
274+
wspace = opts.delete(:workspace)
275+
if wspace.kind_of? String
276+
wspace = find_workspace(wspace)
277+
opts[:workspace] = wspace
278+
end
275279

276280
::ActiveRecord::Base.connection_pool.with_connection {
277281
id = opts.delete(:id)

0 commit comments

Comments
 (0)