luci-app-openvpn: quote grep expression in getPID()

Fixes c0d9c4f3c ("treewide: filter shell arguments through shellquote() where applicable")

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2018-04-06 23:37:38 +02:00
parent 93040427ff
commit 83a59dc0f7

View file

@ -26,7 +26,7 @@ uci:foreach( "openvpn_recipes", "openvpn_recipe",
)
function s.getPID(section) -- Universal function which returns valid pid # or nil
local pid = sys.exec("%s | grep -w [o]penvpn(%s)" % { psstring, section })
local pid = sys.exec("%s | grep -w '[o]penvpn(%s)'" % { psstring, section })
if pid and #pid > 0 then
return tonumber(pid:match("^%d+"))
else