Socket
Socket
Sign inDemoInstall

tar-fs

Package Overview
Dependencies
23
Maintainers
2
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.16.1 to 1.16.2

2

index.js

@@ -264,3 +264,3 @@ var chownr = require('chownr')

xfs.unlink(name, function () {
var srcpath = path.resolve(cwd, header.linkname)
var srcpath = path.join(cwd, path.join('/', header.linkname))

@@ -267,0 +267,0 @@ xfs.link(srcpath, name, function (err) {

{
"name": "tar-fs",
"version": "1.16.1",
"version": "1.16.2",
"description": "filesystem bindings for tar-stream",

@@ -5,0 +5,0 @@ "dependencies": {

var test = require('tape')
var rimraf = require('rimraf')
var tar = require('../index')
var tarStream = require('tar-stream')
var path = require('path')

@@ -313,1 +314,34 @@ var fs = require('fs')

})
test('no abs hardlink targets', function (t) {
var out = path.join(__dirname, 'fixtures', 'invalid')
var outside = path.join(__dirname, 'fixtures', 'outside')
rimraf.sync(out)
var s = tarStream.pack()
fs.writeFileSync(outside, 'something')
s.entry({
type: 'link',
name: 'link',
linkname: outside
})
s.entry({
name: 'link'
}, 'overwrite')
s.finalize()
s.pipe(tar.extract(out))
.on('error', function (err) {
t.ok(err, 'had error')
fs.readFile(outside, 'utf-8', function (err, str) {
t.error(err, 'no error')
t.same(str, 'something')
t.end()
})
})
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc