fix: User login log message fixed when password matches, but user lookup fails

This commit is contained in:
jamesread 2026-02-27 00:10:45 +00:00
parent 03da2ff2e7
commit 54eb2a6586
1 changed files with 3 additions and 1 deletions

View File

@ -180,8 +180,10 @@ func (api *oliveTinAPI) applyLocalLoginResult(req *apiv1.LocalUserLoginRequest,
SameSite: http.SameSiteLaxMode,
}
response.Header().Set("Set-Cookie", cookie.String())
log.WithFields(log.Fields{"username": user.Username}).Info("LocalUserLogin: User logged in successfully.")
} else {
log.WithFields(log.Fields{"username": req.Username}).Warn("LocalUserLogin: Password matched but user lookup failed.")
}
log.WithFields(log.Fields{"username": req.Username}).Info("LocalUserLogin: User logged in successfully.")
} else {
log.WithFields(log.Fields{"username": req.Username}).Warn("LocalUserLogin: User login failed.")
}