mirror of
https://github.com/go-gitea/gitea
synced 2025-12-06 21:08:25 +00:00
Fix oauth2 session gob register (#36017)
`gob.Register` must be called before Sessioner Fix #36016
This commit is contained in:
@@ -267,11 +267,7 @@ func Routes() *web.Router {
|
||||
routes.Get("/ssh_info", misc.SSHInfo)
|
||||
routes.Get("/api/healthz", healthcheck.Check)
|
||||
|
||||
if sessionMid, err := common.Sessioner(); err == nil && sessionMid != nil {
|
||||
mid = append(mid, sessionMid, context.Contexter())
|
||||
} else {
|
||||
log.Fatal("common.Sessioner failed: %v", err)
|
||||
}
|
||||
mid = append(mid, common.MustInitSessioner(), context.Contexter())
|
||||
|
||||
// Get user from session if logged in.
|
||||
mid = append(mid, webAuth(buildAuthGroup()))
|
||||
|
||||
Reference in New Issue
Block a user