From 336ce9bbd7c620226d0ef01ba58c02be12f7b90e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 12 Nov 2014 23:43:24 +0100 Subject: shell escape variables before passing them to the shell Signed-off-by: Adrian C. (anrxc) --- widgets/fs.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'widgets/fs.lua') diff --git a/widgets/fs.lua b/widgets/fs.lua index 7832b1f..4b889dc 100644 --- a/widgets/fs.lua +++ b/widgets/fs.lua @@ -27,7 +27,7 @@ local function worker(format, warg) if warg then warg = "" else warg = "-l" end local fs_info = {} -- Get data from df - local f = io.popen("LC_ALL=C df -kP " .. warg) + local f = io.popen("LC_ALL=C df -kP " .. helpers.shellquote(warg)) for line in f:lines() do -- Match: (size) (used)(avail)(use%) (mount) local s = string.match(line, "^.-[%s]([%d]+)") -- cgit v1.2.3