Merge pull request #2243 from dibdot/ovpn-fix

luci-app-openvpn: file name fix
This commit is contained in:
Dirk Brenken 2018-10-23 23:18:38 +02:00 committed by GitHub
commit 9deb5c11d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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