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/volume.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'widgets/volume.lua') diff --git a/widgets/volume.lua b/widgets/volume.lua index 2a7d377..57970a3 100644 --- a/widgets/volume.lua +++ b/widgets/volume.lua @@ -8,6 +8,7 @@ local tonumber = tonumber local io = { popen = io.popen } local setmetatable = setmetatable local string = { match = string.match } +local helpers = require("vicious.helpers") -- }}} @@ -26,7 +27,7 @@ local function worker(format, warg) } -- Get mixer control contents - local f = io.popen("amixer -M get " .. warg) + local f = io.popen("amixer -M get " .. helpers.shellquote(warg)) local mixer = f:read("*all") f:close() -- cgit v1.2.3