From: Jo-Philipp Wich Date: Fri, 6 Apr 2018 21:37:38 +0000 (+0200) Subject: luci-app-openvpn: quote grep expression in getPID() X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=83a59dc0f74ad5da70a087c18533472742b236cc;hp=93040427ff1977d6eb397b2d5196d6f1963254d5 luci-app-openvpn: quote grep expression in getPID() Fixes c0d9c4f3c ("treewide: filter shell arguments through shellquote() where applicable") Signed-off-by: Jo-Philipp Wich --- 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