summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua11
-rw-r--r--documentation/SubmitPatchesHowTo:.md33
-rw-r--r--modules/luci-mod-failsafe/luasrc/controller/failsafe/failsafe.lua12
-rw-r--r--modules/luci-mod-rpc/luasrc/controller/rpc.lua4
4 files changed, 10 insertions, 50 deletions
diff --git a/applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua b/applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua
index 46b3744403..6c90476f81 100644
--- a/applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua
+++ b/applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua
@@ -60,7 +60,7 @@ s:tab("advanced", translate("Advanced Settings"))
name = s:taboption("general", Value, "name", translate("Name"))
name.optional = false
name.forcewrite = true
-name.datatype = "uciname"
+name.datatype = "and(uciname,maxlength(14))"
function name.write(self, section, value)
if zone:name() ~= value then
@@ -76,15 +76,6 @@ function name.write(self, section, value)
}
end
-function name.validate(self, value)
- -- fw3 defines 14 as the maximum length of zone name
- if #value > 14 then
- return nil, translate("Zone name is too long")
- else
- return value
- end
-end
-
p = {
s:taboption("general", ListValue, "input", translate("Input")),
s:taboption("general", ListValue, "output", translate("Output")),
diff --git a/documentation/SubmitPatchesHowTo:.md b/documentation/SubmitPatchesHowTo:.md
deleted file mode 100644
index cdd15524a5..0000000000
--- a/documentation/SubmitPatchesHowTo:.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# Checkout svn
-
- svn co http://svn.luci.subsignal.org/luci/trunk
-
-and change to that directory:
-
- cd trunk
-
-# Make your changes
-
-Edit the files you want to change. If you add some new files you need to add them to the svn tree:
-
- svn add <dir/files>
-
-Where <dir/files> are the directories/files you have added. Its possible to specify multiple files/directories here.
-
-# Use svn diff to generate a patch with your changes
-
-To check if your changes look ok first do:
-
- svn diff <dir/files>
-
-and check the output. Again you can specify multiple dirs/directories here.
-
-If everything looks like expected save the patch:
-
- svn diff <dir/files> > ./mypatch.patch
-
-
-# Submit patches
-
-Use the [Ticket system](http://luci.subsignal.org/trac/newticket) to submit your patch.
-
diff --git a/modules/luci-mod-failsafe/luasrc/controller/failsafe/failsafe.lua b/modules/luci-mod-failsafe/luasrc/controller/failsafe/failsafe.lua
index 6f78643018..60caadb4b1 100644
--- a/modules/luci-mod-failsafe/luasrc/controller/failsafe/failsafe.lua
+++ b/modules/luci-mod-failsafe/luasrc/controller/failsafe/failsafe.lua
@@ -84,11 +84,13 @@ function action_flashops()
fp = io.open(image_tmp, "w")
end
end
- if chunk then
- fp:write(chunk)
- end
- if eof then
- fp:close()
+ if fp then
+ if chunk then
+ fp:write(chunk)
+ end
+ if eof then
+ fp:close()
+ end
end
end
)
diff --git a/modules/luci-mod-rpc/luasrc/controller/rpc.lua b/modules/luci-mod-rpc/luasrc/controller/rpc.lua
index 129ca43b51..759bb749cf 100644
--- a/modules/luci-mod-rpc/luasrc/controller/rpc.lua
+++ b/modules/luci-mod-rpc/luasrc/controller/rpc.lua
@@ -49,10 +49,10 @@ function rpc_auth()
server.challenge = function(user, pass)
local sid, token, secret
- require "luci.config"
+ local config = require "luci.config"
if sys.user.checkpasswd(user, pass) then
- local sdat = util.ubus("session", "create", { timeout = luci.config.sauth.sessiontime })
+ local sdat = util.ubus("session", "create", { timeout = config.sauth.sessiontime })
if sdat then
sid = sdat.ubus_rpc_session
token = sys.uniqueid(16)