Bugfix : generating session id on some systems was not defined
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 4 Jun 2008 09:53:46 +0000 (11:53 +0200)
committerJoshua Ferraro <jmf@liblime.com>
Mon, 9 Jun 2008 11:51:02 +0000 (06:51 -0500)
Explicitly naming the method to generate id is required on some systems
(SUN 4)

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Auth.pm

index 4b21243..3556336 100755 (executable)
@@ -1118,14 +1118,14 @@ sub get_session {
     my $dbh = C4::Context->dbh;
     my $session;
     if ($storage_method eq 'mysql'){
-        $session = new CGI::Session("driver:MySQL;serializer:yaml", $sessionID, {Handle=>$dbh});
+        $session = new CGI::Session("driver:MySQL;serializer:yaml;id:md5", $sessionID, {Handle=>$dbh});
     }
     elsif ($storage_method eq 'Pg') {
-        $session = new CGI::Session("driver:PostgreSQL;serializer:yaml", $sessionID, {Handle=>$dbh});
+        $session = new CGI::Session("driver:PostgreSQL;serializer:yaml;id:md5", $sessionID, {Handle=>$dbh});
     }
     else {
         # catch all defaults to tmp should work on all systems
-        $session = new CGI::Session("driver:File;serializer:yaml", $sessionID, {Directory=>'/tmp'});
+        $session = new CGI::Session("driver:File;serializer:yaml;id:md5", $sessionID, {Directory=>'/tmp'});
     }
     return $session;
 }