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 a80dd706e0575892cf9bd4bc9bb0c1b88296641a..f92af528e1a4af362c261baf066c03ba1e58f639 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", {