diff options
Diffstat (limited to 'modules/luci-base/luasrc')
-rw-r--r-- | modules/luci-base/luasrc/dispatcher.lua | 4 | ||||
-rw-r--r-- | modules/luci-base/luasrc/http.lua | 6 | ||||
-rw-r--r-- | modules/luci-base/luasrc/model/network.lua | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua index baaa95ad79..45e1e308f8 100644 --- a/modules/luci-base/luasrc/dispatcher.lua +++ b/modules/luci-base/luasrc/dispatcher.lua @@ -429,7 +429,9 @@ function dispatch(request) return end - http.header("Set-Cookie", 'sysauth=%s; path=%s' %{ sid, build_url() }) + http.header("Set-Cookie", 'sysauth=%s; path=%s; HttpOnly%s' %{ + sid, build_url(), http.getenv("HTTPS") == "on" and "; secure" or "" + }) http.redirect(build_url(unpack(ctx.requestpath))) end diff --git a/modules/luci-base/luasrc/http.lua b/modules/luci-base/luasrc/http.lua index 16fb04c549..f4ede4b8a5 100644 --- a/modules/luci-base/luasrc/http.lua +++ b/modules/luci-base/luasrc/http.lua @@ -14,7 +14,7 @@ local table, ipairs, pairs, type, tostring, tonumber, error = module "luci.http" -HTTP_MAX_CONTENT = 1024*8 -- 8 kB maximum content size +HTTP_MAX_CONTENT = 1024*100 -- 100 kB maximum content size context = util.threadlocal() @@ -416,7 +416,7 @@ function mimedecode_message_body(src, msg, file_cb) end return true - end) + end, HTTP_MAX_CONTENT) return ltn12.pump.all(src, function (chunk) len = len + (chunk and #chunk or 0) @@ -460,7 +460,7 @@ function urldecode_message_body(src, msg) end return true - end) + end, HTTP_MAX_CONTENT) return ltn12.pump.all(src, function (chunk) len = len + (chunk and #chunk or 0) diff --git a/modules/luci-base/luasrc/model/network.lua b/modules/luci-base/luasrc/model/network.lua index dfe818bcc7..0f58c16848 100644 --- a/modules/luci-base/luasrc/model/network.lua +++ b/modules/luci-base/luasrc/model/network.lua @@ -1428,7 +1428,7 @@ function wifidev.hwmodes(self) end function wifidev.get_i18n(self) - local t = "Generic" + local t = self.iwinfo.hardware_name or "Generic" if self.iwinfo.type == "wl" then t = "Broadcom" end |