[latex3-commits] [git/LaTeX3-latex3-l3build] spaces: Also escape in popen calls (9030a2c)

Marcel Fabian Krüger tex at 2krueger.de
Wed Sep 14 20:15:50 CEST 2022


Repository : https://github.com/latex3/l3build
On branch  : spaces
Link       : https://github.com/latex3/l3build/commit/9030a2cb45d051ca35dbba885738803c9456565c

>---------------------------------------------------------------

commit 9030a2cb45d051ca35dbba885738803c9456565c
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Wed Sep 14 20:15:50 2022 +0200

    Also escape in popen calls


>---------------------------------------------------------------

9030a2cb45d051ca35dbba885738803c9456565c
 l3build-unpack.lua | 8 ++++----
 l3build-upload.lua | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/l3build-unpack.lua b/l3build-unpack.lua
index a734d4c..75e203b 100644
--- a/l3build-unpack.lua
+++ b/l3build-unpack.lua
@@ -74,14 +74,14 @@ function bundleunpack(sourcedirs, sources)
       local path, name = splitpath(p.src)
       local localdir = abspath(localdir)
       local success = io.popen(
-        "cd " .. unpackdir .. "/" .. path .. os_concat ..
+        "cd " .. normalize_and_escape(unpackdir .. "/" .. path) .. os_concat ..
         os_setenv .. " TEXINPUTS=." .. os_pathsep
-          .. localdir .. (unpacksearch and os_pathsep or "") ..
+          .. normalize_and_escape(localdir) .. (unpacksearch and os_pathsep or "") ..
         os_concat  ..
         os_setenv .. " LUAINPUTS=." .. os_pathsep
-          .. localdir .. (unpacksearch and os_pathsep or "") ..
+          .. normalize_and_escape(localdir) .. (unpacksearch and os_pathsep or "") ..
         os_concat ..
-        unpackexe .. " " .. unpackopts .. " " .. name
+        unpackexe .. " " .. unpackopts .. " " .. normalize_and_escape(name)
           .. (options["quiet"] and (" > " .. os_null) or ""),
         "w"
       ):write(string.rep("y\n", 300)):close()
diff --git a/l3build-upload.lua b/l3build-upload.lua
index d6328d6..4d9a7b0 100644
--- a/l3build-upload.lua
+++ b/l3build-upload.lua
@@ -146,7 +146,7 @@ function upload(tagnames)
   write(ctan_post)
   close(curlopt)
 
-  ctan_post=curlexe .. " --config " .. curloptfile
+  ctan_post=curlexe .. " --config " .. normalize_and_escape(curloptfile)
 
 
 if options["debug"] then





More information about the latex3-commits mailing list.