projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16047d0
)
luci-mod-rpc: move luci config require into the authentication function (#427)
author
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 15 Jul 2015 21:25:43 +0000
(23:25 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 15 Jul 2015 21:28:16 +0000
(23:28 +0200)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
modules/luci-mod-rpc/luasrc/controller/rpc.lua
patch
|
blob
|
history
diff --git
a/modules/luci-mod-rpc/luasrc/controller/rpc.lua
b/modules/luci-mod-rpc/luasrc/controller/rpc.lua
index 0051571701f0582f27f84c5e7bfbf6c04ef36053..129ca43b514ac1d35526829c01e68ffe638d42eb 100644
(file)
--- a/
modules/luci-mod-rpc/luasrc/controller/rpc.lua
+++ b/
modules/luci-mod-rpc/luasrc/controller/rpc.lua
@@
-43,14
+43,14
@@
function rpc_auth()
local ltn12 = require "luci.ltn12"
local util = require "luci.util"
- require "luci.config"
-
local loginstat
local server = {}
server.challenge = function(user, pass)
local sid, token, secret
+ require "luci.config"
+
if sys.user.checkpasswd(user, pass) then
local sdat = util.ubus("session", "create", { timeout = luci.config.sauth.sessiontime })
if sdat then