mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-26 13:43:24 +00:00
fix(auth): record last sign-in on reverse proxy login (#38672)
Reverse proxy and SSPI logins establish a session but never recorded `last_login_unix`, so those users stayed "Never Signed-In" in admin. The write is folded into the language update that `handleSignIn` already does, so it stays at one query and only runs when a session is established. Fixes https://github.com/go-gitea/gitea/issues/7836 --------- Co-authored-by: roman s <roman.sukach@dust-labs.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -121,7 +121,7 @@ func (r *ReverseProxy) Verify(req *http.Request, w http.ResponseWriter, store Da
|
||||
if r.CreateSession && sess != nil {
|
||||
sessionUID, ok := sess.Get(session.KeyUID).(int64)
|
||||
if !ok || sessionUID != user.ID {
|
||||
handleSignIn(w, req, sess, user)
|
||||
handleSignInNonInteractive(w, req, sess, user)
|
||||
}
|
||||
}
|
||||
store.GetData()["IsReverseProxy"] = true
|
||||
|
||||
Reference in New Issue
Block a user