luci-base: pass session timeout as integer
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 9 Feb 2015 12:03:44 +0000 (13:03 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 9 Feb 2015 12:03:44 +0000 (13:03 +0100)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
modules/luci-base/luasrc/dispatcher.lua

index a80dd70..f92af52 100644 (file)
@@ -333,7 +333,7 @@ function dispatch(request)
                                        return
                                else
                                        if not sess then
-                                               local sdat = util.ubus("session", "create", { timeout = luci.config.sauth.sessiontime })
+                                               local sdat = util.ubus("session", "create", { timeout = tonumber(luci.config.sauth.sessiontime) })
                                                if sdat then
                                                        local token = sys.uniqueid(16)
                                                        util.ubus("session", "set", {