Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,155 of 9,155 pages
About the help in other languages
All help pages

Sessions and cookies

For administrators of public sites - the session cookie flags Exponential sets by default, recommended settings for an HTTPS-only site, separate cookies per siteaccess, session timeouts, and how to sign users out after…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/government/security/sessions-and-cookies.md

On this page

Sessions and cookies

This page is for administrators. A stolen session cookie is as good as the password. Exponential sets safe cookie flags by default and signs other sessions out when a password changes; a few settings make it stricter (13.7 Sessions and cookies).

Contents

  1. The defaults
  2. Recommended for an HTTPS-only site
  3. Separate cookies for the administration
  4. Signing users out
  5. Pitfalls
  6. Related pages

The defaults

settings/site.ini [Session] (the cookie keys are commented out; their defaults apply):

KeyDefaultMeaning
CookieSecureautoSecure when the request came over HTTPS
CookieHttponlytruescripts cannot read the cookie
CookieSameSiteLaxnot sent with most cross-site requests
SessionTimeout31104000seconds (360 days)
RememberMeTimeout31104000seconds (360 days); Remember me is checked by default
SessionNameHandlerdefaultcustom gives every siteaccess its own cookie

Also: a new session id at sign-in; logging out ends the session for good; a password change signs out every other session of the user (EndOtherSessions=enabled); a disabled account's sessions end at their next request.

# settings/override/site.ini.append.php
[Session]
CookieSecure=true
CookieHttponly=true
CookieSameSite=Lax
SessionTimeout=28800

and in PHP's configuration session.use_strict_mode=1. Choose the timeout with your editors: a short one limits how long a stolen session is useful, but signs out people who work slowly.

Separate cookies for the administration

[Session]
SessionNameHandler=custom
SessionNamePrefix=eZSESSID
SessionNamePerSiteAccess=enabled

A sign-in on the public site (for example a member area) is then not a sign-in in the administration.

Signing users out

  • After a suspected compromise of one account: change its password; every other session ends at its next request. Disable the account if needed (Users > Check user accounts, Disable).
  • Everybody: with the database session handler ([Session] Handler=ezpSessionHandlerDB), Setup > Sessions lists and removes sessions, with a confirmation (Sessions). With the default handler the page cannot remove sessions one by one; switching handler signs everybody out once.
  • Removing a session does not block the user; disable the account or change the password as well.

Pitfalls

  • CookieSecure=true behind an HTTPS proxy that is not trusted: users are signed out on every page. Configure TrustedProxies[] (see "Proxies and trusted headers").
  • CookieSameSite=Strict drops the session on the first click from an e-mail into a signed-in page.
  • CookieSameSite=None is honored only together with Secure.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x