Commit 0a0ca7d5 authored by ale's avatar ale

Pass a valid UserInfo to the login callback

The sess.UserInfo is still unset at that stage, use valid information
instead. This fixes a bug where keys were not being unlocked for users.
parent 79a14158
Pipeline #5421 passed with stages
in 2 minutes and 56 seconds
......@@ -208,7 +208,7 @@ func (l *Login) ServeHTTP(w http.ResponseWriter, req *http.Request) {
func (l *Login) loginOk(w http.ResponseWriter, req *http.Request, sess *loginSession, password string, userinfo *auth.UserInfo) {
if l.callback != nil {
if err := l.callback(req.Context(), sess.Username, password, sess.UserInfo); err != nil {
if err := l.callback(req.Context(), sess.Username, password, userinfo); err != nil {
log.Printf("login callback error: %v", err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment