fix login with an existing session cookie, RT#25533
authorIvan Kohler <ivan@freeside.biz>
Sun, 5 Jan 2014 09:43:48 +0000 (01:43 -0800)
committerIvan Kohler <ivan@freeside.biz>
Sun, 5 Jan 2014 09:43:48 +0000 (01:43 -0800)
fs_selfservice/FS-SelfService/cgi/selfservice.cgi

index 1372311..f84f5d6 100755 (executable)
@@ -105,7 +105,7 @@ unless ( $nologin_actions{$action} ) {
 
   my %cookies = CGI::Cookie->fetch;
 
-  my $login_rv;
+  my $login_rv = {};
 
   if ( exists($cookies{'session'}) ) {
 
@@ -178,10 +178,7 @@ unless ( $nologin_actions{$action} ) {
 
     } # else session_id ne 'login'
 
-  } else {
-    # there is no session cookie
-    $login_rv = {};
-  }
+  } # else there is no session cookie
 
   if ( !$session_id ) {
     # XXX why are we getting agentnum from a CGI param? surely it should