fix login with an existing session cookie, RT#25533
authorIvan Kohler <ivan@freeside.biz>
Wed, 12 Feb 2014 19:58:52 +0000 (11:58 -0800)
committerIvan Kohler <ivan@freeside.biz>
Wed, 12 Feb 2014 19:58:52 +0000 (11:58 -0800)
fs_selfservice/FS-SelfService/cgi/selfservice.cgi

index f84f5d6..84998bb 100755 (executable)
@@ -101,6 +101,8 @@ if ( $cgi->param('action') =~ /^(\w+)$/ ) {
   }
 }
 
+warn $action;
+
 unless ( $nologin_actions{$action} ) {
 
   my %cookies = CGI::Cookie->fetch;
@@ -1062,7 +1064,7 @@ sub do_template {
   my $timeout = $access_info->{'timeout'} || '60';
   my $cookie = CGI::Cookie->new('-name'     => 'session',
                                 '-value'    => $session_id,
-                                '-expires'  => '+'.$timeout,
+                                '-expires'  => '+'.$timeout.'s',
                                 #'-secure'   => 1, # would be a good idea...
                                );
   if ( $name eq 'logout' ) {