careful-downloader
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10689
127
7
+ Addedis-path-in-cwd@^4.0.0
+ Addedis-path-in-cwd@4.0.0(transitive)
+ Addedis-path-inside@4.0.0(transitive)