Skip to content
Snippets Groups Projects
Commit 3fe4bb19 authored by Jaime Pérez's avatar Jaime Pérez
Browse files

Log a warning when we notice a probable misconfiguration of PHP sessions.

This is related to #478.
parent 5ffabc78
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,14 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler
}
if ($previous_session) {
if (session_name() === $this->cookie_name || $this->cookie_name === null) {
SimpleSAML\Logger::warning(
'There is already a PHP session with the same name as SimpleSAMLphp\'s session, or the '.
"'session.phpsession.cookiename' configuration option is not set. Make sure to set ".
"SimpleSAMLphp's cookie name with a value not used by any other applications."
);
}
/*
* We shouldn't have a session at this point, so it might be an application session. Save the details to
* retrieve it later and commit.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment