Content-Length: 220178 | pFad | http://github.com/isaacs/node-tar/commit/4f8585178af78f8f64c5ca38e923c306613278b9

CC Ignore potentially unsafe files · isaacs/node-tar@4f85851 · GitHub
Skip to content

Commit

Permalink
Ignore potentially unsafe files
Browse files Browse the repository at this point in the history
  • Loading branch information
BRKurek committed Apr 27, 2019
1 parent 52237e3 commit 4f85851
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function Parse () {
me._stream = new BlockStream(512)
me.position = 0
me._ended = false
me._entries = []

me._stream.on("error", function (e) {
me.emit("error", e)
Expand Down Expand Up @@ -250,7 +251,16 @@ Parse.prototype._startEntry = function (c) {

if (onend) entry.on("end", onend)

if (entry.type === "File") {
this._entries.forEach(function(prevEntry) {
if (prevEntry.type === "Link" && prevEntry.path === entry.path) {
ev = "ignoredEntry"
}
})
}

this._entry = entry
this._entries.push(entry)
var me = this

entry.on("pause", function () {
Expand Down

0 comments on commit 4f85851

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/isaacs/node-tar/commit/4f8585178af78f8f64c5ca38e923c306613278b9

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy