Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

careful-downloader

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

careful-downloader - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

3

index.js

@@ -10,2 +10,3 @@ import path from "path";

import urlParse from "url-parse";
import isPathInCwd from "is-path-in-cwd";

@@ -27,3 +28,3 @@ export default async function downloader(downloadUrl, checksumUrl, options) {

// throw an error if destDir is outside of the module to prevent path traversal for security reasons
if (!options.destDir.startsWith(process.cwd())) {
if (!isPathInCwd(options.destDir)) {
throw new Error(`destDir must be located within '${process.cwd()}', it's currently set to '${options.destDir}'.`);

@@ -30,0 +31,0 @@ }

{
"name": "careful-downloader",
"version": "1.3.0",
"version": "1.3.1",
"description": "🕵️‍♀️ Downloads a file and its checksums to a temporary directory, validates the hash, and optionally extracts it if safe.",

@@ -30,2 +30,3 @@ "license": "MIT",

"got": "^11.8.2",
"is-path-in-cwd": "^4.0.0",
"sumchecker": "^3.0.1",

@@ -32,0 +33,0 @@ "tempy": "^2.0.0",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc