Skip to content

Commit

Permalink
Fix "session_id" parameter for static session IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasbachem committed Sep 21, 2015
1 parent 6f102dd commit 3d4fff8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/storage/AgaviSessionStorage.class.php
Expand Up @@ -90,11 +90,13 @@ public function startup()

session_name($this->getParameter('session_name', 'Agavi'));

if($this->hasParameter('session_id')) {
session_id($this->getParameter('session_id'));
}

if(session_id() === '') {
$sessionId = session_id();
$staticSessionId = $this->getParameter('session_id');
if($sessionId === '' || ($staticSessionId && $sessionId !== $staticSessionId)) {
if($staticSessionId) {
session_id($staticSessionId);
}

$cookieDefaults = session_get_cookie_params();

$routing = $this->context->getRouting();
Expand Down

0 comments on commit 3d4fff8

Please sign in to comment.