Signed-off-by: Jo-Philipp Wich <jo@mein.io>
timeout = tonumber(luci.config.sauth.sessiontime)
})
timeout = tonumber(luci.config.sauth.sessiontime)
})
+ local rp = context.requestpath
+ and table.concat(context.requestpath, "/") or ""
+
if type(login) == "table" and
type(login.ubus_rpc_session) == "string"
then
if type(login) == "table" and
type(login.ubus_rpc_session) == "string"
then
values = { token = sys.uniqueid(16) }
})
values = { token = sys.uniqueid(16) }
})
+ io.stderr:write("luci: accepted login on /%s for %s from %s\n"
+ %{ rp, user, http.getenv("REMOTE_ADDR") or "?" })
+
return session_retrieve(login.ubus_rpc_session)
end
return session_retrieve(login.ubus_rpc_session)
end
+
+ io.stderr:write("luci: failed login on /%s for %s from %s\n"
+ %{ rp, user, http.getenv("REMOTE_ADDR") or "?" })
"https://github.com/openwrt/luci/issues"
)
"https://github.com/openwrt/luci/issues"
)
+ if track.sysauth and not ctx.authsession then
local authen = track.sysauth_authenticator
local _, sid, sdat, default_user, allowed_users
local authen = track.sysauth_authenticator
local _, sid, sdat, default_user, allowed_users