luci-mod-rpc: move luci config require into the authentication function (#427)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
parent
16047d03c5
commit
3610f3222d
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue