You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you crate a cookie with cookie.duration = Duration.ofDays((100 * 365).toLong()) a cookie without a duration (session-cookie) is created. Apparently the commit 17bb8fb which fixed another issue broke that case
I see here 2 ways to fix it:
a) throw if maxAge > Int.MAX_VALUE (so at least the error would be found immediately and not after several days of debugging)
b) move the ?.takeIf { it <= Int.MAX_VALUE } from line 31 to line 38, so line 38 would be maxAge?.takeIf { it <= Int.MAX_VALUE }?.toInt() ?: 0,
The text was updated successfully, but these errors were encountered:
bump maxAge to Int.MAX_VALUE since usually people simply want very very long duration and it doesn't matter what exact value it will be (for now I'll prefer it as a quick fix)
Ktor 1.1.1 reverts fixes that are made in #686:
If you crate a cookie with
cookie.duration = Duration.ofDays((100 * 365).toLong())
a cookie without a duration (session-cookie) is created. Apparently the commit 17bb8fb which fixed another issue broke that caseI see here 2 ways to fix it:
a) throw if
maxAge > Int.MAX_VALUE
(so at least the error would be found immediately and not after several days of debugging)b) move the
?.takeIf { it <= Int.MAX_VALUE }
from line 31 to line 38, so line 38 would bemaxAge?.takeIf { it <= Int.MAX_VALUE }?.toInt() ?: 0,
The text was updated successfully, but these errors were encountered: