From 6e1bdbbed700270e4f15b3233ede102414bcc9b5 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 9 Oct 2014 13:31:50 -0700 Subject: [PATCH] Verify that file path is absolute or relative --- src/module-cache.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/src/module-cache.coffee b/src/module-cache.coffee index 7e3624e18..527e1abb7 100644 --- a/src/module-cache.coffee +++ b/src/module-cache.coffee @@ -87,6 +87,7 @@ satisfies = (version, rawRange) -> resolveFilePath = (relativePath, parentModule) -> return unless relativePath return unless parentModule?.id + return unless relativePath[0] is '.' or fs.isAbsolute(relativePath) return if relativePath[relativePath.length - 1] is '/' resolvedPath = path.resolve(path.dirname(parentModule.id), relativePath)