mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 13:04:38 +03:00
when login sessions to admin/account/webmail interfaces expiry or are no longer valid, explain the behaviour in the message
before, we would just say "session expired". now we say "session expired (after 12 hours inactivity)" (for admin) or "session expired (after 24 hours inactivity)" for account/webmail. for unknown sessions in the admin interface, we also explain that server restarts and 10 more new sessions can be the reason. for issue #202 by ally9335
This commit is contained in:
@ -102,7 +102,7 @@ func sessionUse(ctx context.Context, log mlog.Log, accountName string, sessionTo
|
||||
if !ok {
|
||||
return LoginSession{}, fmt.Errorf("unknown session token")
|
||||
} else if time.Until(ls.Expires) < 0 {
|
||||
return LoginSession{}, fmt.Errorf("session expired")
|
||||
return LoginSession{}, fmt.Errorf("session expired (after 24 hours inactivity)")
|
||||
} else if csrfToken != "" && csrfToken != ls.csrfToken {
|
||||
return LoginSession{}, fmt.Errorf("mismatch between csrf and session tokens")
|
||||
}
|
||||
|
Reference in New Issue
Block a user