summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-04-06 23:37:38 +0200
committerJo-Philipp Wich <jo@mein.io>2018-04-06 23:38:38 +0200
commit83a59dc0f74ad5da70a087c18533472742b236cc (patch)
tree82857caec63bebbbe9b4ff3faa387713081a17ba
parent93040427ff1977d6eb397b2d5196d6f1963254d5 (diff)
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>
-rw-r--r--applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua
index ccad53151..52ba9e3f2 100644
--- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua
+++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua
@@ -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