Since 1.1.0.7 the session ID (ceid) is appended to links even when the session cookie is present
Posted: Wed Nov 25, 2026 1:01 pm
Hi all,
after upgrading to 1.1.0.7 we noticed that ceid=… is added to all non-SEO links (shopping_cart.php, login.php, create_account.php, checkout pages, redirects such as account.php → login.php?ceid=…). This happens for every visitor, including those whose browser already sends the session cookie. SESSION_FORCE_COOKIE_USE is False, and session.use_trans_sid is 0.
The cause seems to be this change in includes/system/segments/application/start_session.php:
// before 1.1.0.7
$SID = (defined('SID') ? SID : '');
// since 1.1.0.7
$SID = (! empty(session_id()) ? session_name() . '=' . session_id() : '');
The old PHP constant SID was only filled when no session cookie came with the request. So the ID was only added on the very first page view of a visitor without a cookie. The new line is non-empty whenever a session exists, and Href::real_link() appends the ID to every link built with Linker->build(). Form::hide_session_id() behaves the same way, since it now falls back to session_id().
Side effects for us:
Session IDs show up in URLs that customers copy and share (session hijacking risk).
A custom link that already had a ? in the page name broke (…&action=insert?ceid=…).
Questions:
Is this intended, or should the new code keep the old "only without a cookie" behaviour? For example: $SID = (Session::is_started() && !isset($_COOKIE[session_name()])) ? session_name() . '=' . session_id() : '';
Is setting SESSION_FORCE_COOKIE_USE = True the recommended way to turn this off completely? Are there any side effects we should know about, for example the first page view or carts of guest visitors?
We'd rather not patch core files, so any advice on the intended way to handle this is welcome.
Thanks!
after upgrading to 1.1.0.7 we noticed that ceid=… is added to all non-SEO links (shopping_cart.php, login.php, create_account.php, checkout pages, redirects such as account.php → login.php?ceid=…). This happens for every visitor, including those whose browser already sends the session cookie. SESSION_FORCE_COOKIE_USE is False, and session.use_trans_sid is 0.
The cause seems to be this change in includes/system/segments/application/start_session.php:
// before 1.1.0.7
$SID = (defined('SID') ? SID : '');
// since 1.1.0.7
$SID = (! empty(session_id()) ? session_name() . '=' . session_id() : '');
The old PHP constant SID was only filled when no session cookie came with the request. So the ID was only added on the very first page view of a visitor without a cookie. The new line is non-empty whenever a session exists, and Href::real_link() appends the ID to every link built with Linker->build(). Form::hide_session_id() behaves the same way, since it now falls back to session_id().
Side effects for us:
Session IDs show up in URLs that customers copy and share (session hijacking risk).
A custom link that already had a ? in the page name broke (…&action=insert?ceid=…).
Questions:
Is this intended, or should the new code keep the old "only without a cookie" behaviour? For example: $SID = (Session::is_started() && !isset($_COOKIE[session_name()])) ? session_name() . '=' . session_id() : '';
Is setting SESSION_FORCE_COOKIE_USE = True the recommended way to turn this off completely? Are there any side effects we should know about, for example the first page view or carts of guest visitors?
We'd rather not patch core files, so any advice on the intended way to handle this is welcome.
Thanks!