mirror of
https://github.com/gogs/gogs.git
synced 2025-05-31 11:42:13 +00:00
user/auth: flush and destroy session at logout (#5540)
Reported by @cezar97.
This commit is contained in:
parent
be6bb5314e
commit
f2ec0d80a8
2
gogs.go
2
gogs.go
@ -16,7 +16,7 @@ import (
|
|||||||
"github.com/gogs/gogs/pkg/setting"
|
"github.com/gogs/gogs/pkg/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.11.75.1203"
|
const APP_VER = "0.11.76.1204"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
setting.AppVer = APP_VER
|
setting.AppVer = APP_VER
|
||||||
|
@ -281,8 +281,8 @@ func LoginTwoFactorRecoveryCodePost(c *context.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func SignOut(c *context.Context) {
|
func SignOut(c *context.Context) {
|
||||||
c.Session.Delete("uid")
|
c.Session.Flush()
|
||||||
c.Session.Delete("uname")
|
c.Session.Destory(c.Context)
|
||||||
c.SetCookie(setting.CookieUserName, "", -1, setting.AppSubURL)
|
c.SetCookie(setting.CookieUserName, "", -1, setting.AppSubURL)
|
||||||
c.SetCookie(setting.CookieRememberName, "", -1, setting.AppSubURL)
|
c.SetCookie(setting.CookieRememberName, "", -1, setting.AppSubURL)
|
||||||
c.SetCookie(setting.CSRFCookieName, "", -1, setting.AppSubURL)
|
c.SetCookie(setting.CSRFCookieName, "", -1, setting.AppSubURL)
|
||||||
|
12
vendor/vendor.json
vendored
12
vendor/vendor.json
vendored
@ -135,16 +135,16 @@
|
|||||||
"revisionTime": "2016-06-27T17:00:12Z"
|
"revisionTime": "2016-06-27T17:00:12Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "qLY+SEQlwlFlpUwT2ZyUv+UlsxA=",
|
"checksumSHA1": "/t1kyFHHcqE/fUrjgdw9X8PlrqQ=",
|
||||||
"path": "github.com/go-macaron/session",
|
"path": "github.com/go-macaron/session",
|
||||||
"revision": "068d408f9c54c7fa7fcc5e2bdd3241ab21280c9e",
|
"revision": "cdb0ddf74421e2bbc43443789c46540f5235a71a",
|
||||||
"revisionTime": "2018-11-07T03:18:28Z"
|
"revisionTime": "2018-12-05T00:27:18Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "jVW5CmzplA0UDjai0AFYJFVXAJk=",
|
"checksumSHA1": "AGaED15nGifQkpU2bpU9Kgd7O4A=",
|
||||||
"path": "github.com/go-macaron/session/redis",
|
"path": "github.com/go-macaron/session/redis",
|
||||||
"revision": "068d408f9c54c7fa7fcc5e2bdd3241ab21280c9e",
|
"revision": "cdb0ddf74421e2bbc43443789c46540f5235a71a",
|
||||||
"revisionTime": "2018-11-07T03:18:28Z"
|
"revisionTime": "2018-12-05T00:27:18Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "VMRkwnbl0mKWWvK/62CnIlv1oOg=",
|
"checksumSHA1": "VMRkwnbl0mKWWvK/62CnIlv1oOg=",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user