git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
bab9c12
)
luci-app-openvpn: fix validity check for new instance input field
author
Martin Schiller
<redacted>
Tue, 19 Dec 2017 08:54:09 +0000
(09:54 +0100)
committer
Martin Schiller
<redacted>
Thu, 15 Feb 2018 05:14:24 +0000
(06:14 +0100)
Signed-off-by: Martin Schiller <redacted>
applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua
patch
|
blob
|
history
diff --git
a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua
b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua
index 6433229f690e1099191f2427f78e92d0eab9787f..d5e0019eb7af959f37ee7f7adb8b8a3d4ad662ee 100644
(file)
--- a/
applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua
+++ b/
applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua
@@
-56,7
+56,7
@@
function s.create(self, name)
luci.cbi.CREATE_PREFIX .. self.config .. "." ..
self.sectiontype .. ".text"
)
- if
string.len(name)>
3 and not name:match("[^a-zA-Z0-9_]") then
+ if
#name >
3 and not name:match("[^a-zA-Z0-9_]") then
uci:section(
"openvpn", "openvpn", name,
uci:get_all( "openvpn_recipes", recipe )
@@
-67,9
+67,11
@@
function s.create(self, name)
uci:save("openvpn")
luci.http.redirect( self.extedit:format(name) )
- else
+ else
if #name > 0 then
self.invalid_cts = true
end
+
+ return 0
end
git clone https://git.99rst.org/PROJECT