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:
parent
93040427ff
commit
83a59dc0f7
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ uci:foreach( "openvpn_recipes", "openvpn_recipe",
|
||||||
)
|
)
|
||||||
|
|
||||||
function s.getPID(section) -- Universal function which returns valid pid # or nil
|
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
|
if pid and #pid > 0 then
|
||||||
return tonumber(pid:match("^%d+"))
|
return tonumber(pid:match("^%d+"))
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue