luci-app-openvpn: file name fix 2243/head
authorDirk Brenken <dev@brenken.org>
Tue, 23 Oct 2018 21:16:38 +0000 (23:16 +0200)
committerDirk Brenken <dev@brenken.org>
Tue, 23 Oct 2018 21:16:38 +0000 (23:16 +0200)
* fix shellquote oversight of the last commit

Signed-off-by: Dirk Brenken <dev@brenken.org>
applications/luci-app-openvpn/luasrc/controller/openvpn.lua

index 2c153c4cd57279884a0bafedca2c73f4a9015201..61592d0fac8472705256a94eec40e2a60d0895f1 100644 (file)
@@ -18,7 +18,7 @@ function ovpn_upload()
        local util   = require("luci.util")
        local uci    = require("luci.model.uci").cursor()
        local upload = http.formvalue("ovpn_file")
-       local name   = util.shellquote(http.formvalue("instance_name2"))
+       local name   = string.gsub(util.shellquote(http.formvalue("instance_name2")), "'", "")
        local file   = "/etc/openvpn/" ..name.. ".ovpn"
 
        if name and upload then