diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-04-06 23:37:38 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-04-06 23:38:38 +0200 |
commit | 83a59dc0f74ad5da70a087c18533472742b236cc (patch) | |
tree | 82857caec63bebbbe9b4ff3faa387713081a17ba /applications | |
parent | 93040427ff1977d6eb397b2d5196d6f1963254d5 (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>
Diffstat (limited to 'applications')
-rw-r--r-- | applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua | 2 |
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 |