npm-pkg-lint 4.3.3 → 4.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -14459,12 +14459,13 @@ var Unpack = class extends Parser {
14459
14459
  // return true if the field was successfully sanitized
14460
14460
  [STRIPABSOLUTEPATH](entry, field) {
14461
14461
  const p = entry[field];
14462
+ const { type } = entry;
14462
14463
  if (!p || this.preservePaths)
14463
14464
  return true;
14464
14465
  const parts = p.split("/");
14465
14466
  if (parts.includes("..") || /* c8 ignore next */
14466
14467
  isWindows3 && /^[a-z]:\.\.$/i.test(parts[0] ?? "")) {
14467
- if (field === "path") {
14468
+ if (field === "path" || type === "Link") {
14468
14469
  this.warn("TAR_ENTRY_ERROR", `${field} contains '..'`, {
14469
14470
  entry,
14470
14471
  [field]: p