mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
securecookie encodes sessions with gob, so the issued and expires times come back as int64. The refresh looked for a float64, found none and never fired, so --cookie-refresh=1h, which the chart sets, did nothing. The times are now read in either form. A refreshed cookie keeps the token's expiry: it gets a new issued time and a fresh securecookie timestamp, never a longer life than the token inside it. Encoding a session fails when it outgrows securecookie's maximum length, which a large token can reach. Sign-in set an empty cookie in that case, and the refresh, now that it runs, would have replaced a working cookie with an empty one. Sign-in now shows an error instead, and a refresh that cannot encode leaves the current cookie in place. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la>