Revision: 2239
Author: olavmrk
Date: Fri Mar 26 03:14:56 2010
Log: openid: Fix session_start being called multiple times.
http://code.google.com/p/simplesamlphp/source/detail?r=2239
Modified:
/trunk/modules/openid/www/consumer.php
=======================================
--- /trunk/modules/openid/www/consumer.php Wed Feb 10 05:03:41 2010
+++ /trunk/modules/openid/www/consumer.php Fri Mar 26 03:14:56 2010
@@ -13,7 +13,19 @@
require_once('Auth/OpenID/Server.php');
require_once('Auth/OpenID/ServerRequest.php');
-session_start();
+/*
+ * The OpenID library uses the $_SESSION variable, so we may need to
+ * initialize the session.
+ *
+ * We first initialize the SimpleSAML_Session object, to allow its
configuration to
+ * take precedence. If the SimpleSAML_Session object doesn't use the PHP
session, we
+ * will initialize the PHP session with default settings.
+ */
+SimpleSAML_Session::getInstance();
+if(session_id() === '') {
+ /* PHP session not initialized - start session. */
+ session_start();
+}
$config = SimpleSAML_Configuration::getInstance();
--
You received this message because you are subscribed to the Google Groups
"simpleSAMLphp commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/simplesamlphp-commits?hl=en.