summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-rpc
diff options
context:
space:
mode:
authorSabbir Ahmed <sabbiirr@gmail.com>2015-09-12 15:11:18 +0600
committerSabbir Ahmed <sabbiirr@gmail.com>2015-09-12 15:11:18 +0600
commitfff7c6c5188ff7a82b5d9f46a6f2c143288b5ed1 (patch)
treed0439535120bdf8bd416c04558f4f40f9566c48d /modules/luci-mod-rpc
parentf0083abed10e8a397ebe9e62801e3b5d536ba7b6 (diff)
modules/luci-mod-rpc: fix attempt to index global 'luci' (a nil value)
Diffstat (limited to 'modules/luci-mod-rpc')
-rw-r--r--modules/luci-mod-rpc/luasrc/controller/rpc.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/luci-mod-rpc/luasrc/controller/rpc.lua b/modules/luci-mod-rpc/luasrc/controller/rpc.lua
index 129ca43b5..759bb749c 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)