[LON-CAPA-cvs] cvs: loncom /auth lonlogout.pm switchserver.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 01 Mar 2007 23:14:12 -0000


albertel		Thu Mar  1 18:14:12 2007 EDT

  Modified files:              
    /loncom/auth	lonlogout.pm switchserver.pm 
  Log:
  - BUG#5212 unset the cookie when logging out.
  
  
Index: loncom/auth/lonlogout.pm
diff -u loncom/auth/lonlogout.pm:1.24 loncom/auth/lonlogout.pm:1.25
--- loncom/auth/lonlogout.pm:1.24	Fri Jan 12 10:54:12 2007
+++ loncom/auth/lonlogout.pm	Thu Mar  1 18:14:12 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Logout Handler
 #
-# $Id: lonlogout.pm,v 1.24 2007/01/12 15:54:12 raeburn Exp $
+# $Id: lonlogout.pm,v 1.25 2007/03/01 23:14:12 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -66,7 +66,15 @@
 			 $env{'user.name'},
 			 $env{'user.home'},
 			 "Logout $ENV{'REMOTE_ADDR'}");
+
     &Apache::loncommon::content_type($r,'text/html');
+
+    #expire the cookie
+    my $c = new CGI::Cookie(-name    => 'lonID',
+			    -value   => '',
+			    -expires => '-10y',);
+    $r->header_out('Set-cookie' => $c);
+
     $r->send_http_header;
     return OK if $r->header_only;
 # -------------------------------------------------------- Menu script and info
Index: loncom/auth/switchserver.pm
diff -u loncom/auth/switchserver.pm:1.11 loncom/auth/switchserver.pm:1.12
--- loncom/auth/switchserver.pm:1.11	Fri Jan 12 10:44:27 2007
+++ loncom/auth/switchserver.pm	Thu Mar  1 18:14:12 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Switch Servers Handler
 #
-# $Id: switchserver.pm,v 1.11 2007/01/12 15:44:27 raeburn Exp $
+# $Id: switchserver.pm,v 1.12 2007/03/01 23:14:12 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -89,6 +89,12 @@
 			 "Switch Server to $env{'form.otherserver'} with role $env{'form.role'} $ENV{'REMOTE_ADDR'}");
 
     &Apache::loncommon::content_type($r,'text/html');
+
+    #expire the cookie
+    my $c = new CGI::Cookie(-name    => 'lonID',
+			    -value   => '',
+			    -expires => '-10y',);
+    $r->header_out('Set-cookie' => $c);
     $r->send_http_header;
     return OK if $r->header_only;
 # -------------------------------------------------------- Menu script and info