diff options
author | Steven Barth <steven@midlink.org> | 2008-12-14 21:43:05 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-12-14 21:43:05 +0000 |
commit | 509a3daadbfcd9cbe550ff9c70a6f7af55dd2a0f (patch) | |
tree | 2dc52775caf52bad3dea97130f834030e2e80f48 /modules/admin-full/luasrc | |
parent | 8b978f79fca72d3d8d76a1fb147addea2d7e3ded (diff) |
Kill session on logout
Diffstat (limited to 'modules/admin-full/luasrc')
-rw-r--r-- | modules/admin-full/luasrc/controller/admin/index.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/admin-full/luasrc/controller/admin/index.lua b/modules/admin-full/luasrc/controller/admin/index.lua index 071dd595d..c0322d3a2 100644 --- a/modules/admin-full/luasrc/controller/admin/index.lua +++ b/modules/admin-full/luasrc/controller/admin/index.lua @@ -49,6 +49,12 @@ function index() end function action_logout() + local dsp = require "luci.dispatcher" + local sauth = require "luci.sauth" + if dsp.context.authsession then + sauth.kill(dsp.context.authsession) + end + luci.http.header("Set-Cookie", "sysauth=; path=/") luci.http.redirect(luci.dispatcher.build_url()) end
\ No newline at end of file |