fix(authn): correctly handle session-limited cookies
All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good

See CNOUS/mse#4347
This commit is contained in:
wpetit 2024-11-08 12:21:23 +01:00
parent 239d4573c3
commit 74c2a2c055

View File

@ -75,7 +75,7 @@ func (s *Store) New(r *http.Request, name string) (*sessions.Session, error) {
}
func (s *Store) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error {
if session.Options.MaxAge <= 0 {
if session.Options.MaxAge < 0 {
if err := s.delete(r.Context(), session); err != nil {
return errors.WithStack(err)
}