fix: update parseSession callas after merging home page (#4701)

Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
This commit is contained in:
Maksim Nabokikh
2026-03-30 22:58:49 +02:00
committed by GitHub
parent bc8f045ad8
commit d4807b6ae6
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ func (s *Server) handleHome(w http.ResponseWriter, r *http.Request) {
}
if cookie, err := r.Cookie(s.sessionConfig.CookieName); err == nil && cookie.Value != "" {
if userID, connectorID, nonce, err := parseSessionCookie(cookie.Value); err == nil {
if userID, connectorID, nonce, err := parseSessionCookie(cookie.Value, s.sessionConfig.CookieEncryptionKey); err == nil {
session, err := s.storage.GetAuthSession(ctx, userID, connectorID)
if err == nil && session.Nonce == nonce {
data.LoggedIn = true
+1 -1
View File
@@ -141,7 +141,7 @@ func TestHomeLoggedIn(t *testing.T) {
req := httptest.NewRequest("GET", "/", nil)
req.AddCookie(&http.Cookie{
Name: "dex_session",
Value: sessionCookieValue(userID, connectorID, nonce),
Value: sessionCookieValue(userID, connectorID, nonce, nil),
})
rr := httptest.NewRecorder()