diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-01-20 19:16:59 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-01-20 19:40:46 +0100 |
commit | cc01770fa1cf09b729dd931df77b149d1b20d2ef (patch) | |
tree | 7a0adcf380d8de68492bf522931e076e67ace655 /applications/luci-app-openvpn/luasrc | |
parent | 878d6622828676dbb8bf0cb26ffc242079aae306 (diff) |
luci-app-openvpn: allow and restrict file uploads to /etc/openvpn/
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-openvpn/luasrc')
-rw-r--r-- | applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua | 2 | ||||
-rw-r--r-- | applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua index cce850fe0b..d15aaeb4fb 100644 --- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua +++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua @@ -838,6 +838,8 @@ for _, option in ipairs(params) do o.value = option[3] elseif option[1] == FileUpload then + o.initial_directory = "/etc/openvpn" + function o.cfgvalue(self, section) local cfg_val = AbstractValue.cfgvalue(self, section) diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua index 3c793c5ce3..980238cb67 100644 --- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua +++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua @@ -128,6 +128,8 @@ for _, option in ipairs(basicParams) do o.value = option[3] elseif option[1] == FileUpload then + o.initial_directory = "/etc/openvpn" + function o.cfgvalue(self, section) local cfg_val = AbstractValue.cfgvalue(self, section) |