Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] session recreation results in no session at all #2352

Open
mblaschke opened this issue Jan 14, 2024 · 1 comment
Open

[BUG] session recreation results in no session at all #2352

mblaschke opened this issue Jan 14, 2024 · 1 comment
Assignees

Comments

@mblaschke
Copy link

mblaschke commented Jan 14, 2024

Describe the bug
I've updated from iris v12.2.7 and v12.2.8 to v12.2.9 and session recreation results in no session (set-cookie header is there but sets an empty value)

To Reproduce

using following code to recreate the session:

func (c *Server) recreateSession(ctx iris.Context, cookieOptions ...context.CookieOption) *sessions.Session {
	c.session.Destroy(ctx)
	return c.startSession(ctx, cookieOptions...)
}

func (c *Server) startSession(ctx iris.Context, cookieOptions ...context.CookieOption) *sessions.Session {
  s := c.session.Start(ctx, cookieOptionList...)
  return s
}

header fist call:

Set-Cookie: app-sid=920c2e16-b645-45be-b22f-172fade5457c; Path=/; Expires=Sun, 14 Jan 2024 20:03:05 GMT; Max-Age=7199; HttpOnly; SameSite=Lax

header session recreation:

Set-Cookie: app-sid=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=0; HttpOnly

Expected behavior
Old Session should be terminated, a new one should be created and session cookie should be set to new id

iris.Version

  • v12.2.9
  • v12.2.10-0.20240114045817-70882914d445 (main)
@mblaschke
Copy link
Author

same with v12.2.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants