Land #7931, Fix CVE-2017-5231 and respect user's dest

bug/bundler_fix
Brent Cook 2017-02-07 19:22:17 -06:00
commit 522c6dce8e
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96
1 changed files with 1 additions and 1 deletions

View File

@ -442,7 +442,7 @@ class Console::CommandDispatcher::Stdapi::Fs
files.each do |file|
src_separator = client.fs.file.separator
src_path = file['path'] + client.fs.file.separator + file['name']
dest_path = src_path.tr(src_separator, ::File::SEPARATOR)
dest_path = ::File.join(dest, ::Rex::FileUtils::clean_path(file['path'].tr(src_separator, ::File::SEPARATOR)))
client.fs.file.download(dest_path, src_path, opts) do |step, src, dst|
print_status("#{step.ljust(11)}: #{src} -> #{dst}")