Skip to content

Commit

Permalink
Land #14034, telpho10_credential_dump: Prevent traversal in untar
Browse files Browse the repository at this point in the history
  • Loading branch information
smcintyre-r7 committed Aug 25, 2020
2 parents 84c9e95 + 37a0675 commit 9bd687e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/auxiliary/admin/http/telpho10_credential_dump.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def untar(tarfile)
File.open(tarfile, 'rb') do |file|
Rex::Tar::Reader.new(file) do |tar|
tar.each do |entry|
dest = File.join destination, entry.full_name
dest = File.join(destination, File.basename(entry.full_name))
if entry.file?
File.open(dest, 'wb') do |f|
f.write(entry.read)
Expand Down

0 comments on commit 9bd687e

Please sign in to comment.