diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2015-09-17 11:47:54 +0300 |
---|---|---|
committer | Hannu Nyman <hannu.nyman@iki.fi> | 2015-09-17 11:47:54 +0300 |
commit | 7ead90bb2624796960a3de471160b42826f1960f (patch) | |
tree | c481ef3aaa716c3f3d4a973f12922557cbf6680c /modules | |
parent | 892dd7383afda984d7dc274e3d51683105397240 (diff) | |
parent | fff7c6c5188ff7a82b5d9f46a6f2c143288b5ed1 (diff) |
Merge pull request #470 from thesabbir/patch-01
merged
modules/luci-mod-rpc: fix #466 #427 attempt to index global 'luci' (a nil value)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-mod-rpc/luasrc/controller/rpc.lua | 4 |
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 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) |