luci-mod-admin-full: do not access dispatcher.context.urltoken in logout
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 21 Oct 2015 14:42:39 +0000 (16:42 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 21 Oct 2015 14:43:07 +0000 (16:43 +0200)
The urltoken table is going to be removed.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
modules/luci-mod-admin-full/luasrc/controller/admin/index.lua

index d00d546b649b37eb195aff734372de4d4d6e4821..cc8c2e3ae62aa64f92780f0638bd4aef90a46be7 100644 (file)
@@ -33,12 +33,10 @@ function action_logout()
        if sid then
                utl.ubus("session", "destroy", { ubus_rpc_session = sid })
 
-               dsp.context.urltoken.stok = nil
-
                luci.http.header("Set-Cookie", "sysauth=%s; expires=%s; path=%s/" %{
                        sid, 'Thu, 01 Jan 1970 01:00:00 GMT', dsp.build_url()
                })
        end
 
-       luci.http.redirect(luci.dispatcher.build_url())
+       luci.http.redirect(dsp.build_url())
 end