From: Cheng Zhao Date: Wed, 17 Jun 2015 07:52:29 +0000 (+0800) Subject: Handle ".." in asar path, fix #1982 X-Git-Tag: v0.28.2~4 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=db8ffe1dc71024c4096251007c118cb0261bed58;p=electron.git Handle ".." in asar path, fix #1982 --- diff --git a/atom/common/lib/asar.coffee b/atom/common/lib/asar.coffee index 7ce89156..ee6d18e4 100644 --- a/atom/common/lib/asar.coffee +++ b/atom/common/lib/asar.coffee @@ -20,6 +20,7 @@ process.on 'exit', -> splitPath = (p) -> return [false] if typeof p isnt 'string' return [true, p, ''] if p.substr(-5) is '.asar' + p = path.normalize p index = p.lastIndexOf ".asar#{path.sep}" return [false] if index is -1 [true, p.substr(0, index + 5), p.substr(index + 6)]