[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /auth lonlogin.pm

raeburn raeburn at source.lon-capa.org
Sun Aug 4 08:18:45 EDT 2019


raeburn		Sun Aug  4 12:18:45 2019 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/auth	lonlogin.pm 
  Log:
  - For 2.11
    Backport 1.170, 1.173
  
  
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.158.2.8 loncom/auth/lonlogin.pm:1.158.2.9
--- loncom/auth/lonlogin.pm:1.158.2.8	Thu Aug  1 14:21:37 2019
+++ loncom/auth/lonlogin.pm	Sun Aug  4 12:18:44 2019
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Login Screen
 #
-# $Id: lonlogin.pm,v 1.158.2.8 2019/08/01 14:21:37 raeburn Exp $
+# $Id: lonlogin.pm,v 1.158.2.9 2019/08/04 12:18:44 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -76,15 +76,19 @@
     &Apache::lonlocal::get_language_handle($r);
     &Apache::loncommon::content_type($r,'text/html');
     if ($expirepub) {
-        my $c = new CGI::Cookie(-name    => 'lonID',
+        my $c = new CGI::Cookie(-name    => 'lonPubID',
                                 -value   => '',
                                 -expires => '-10y',);
         $r->header_out('Set-cookie' => $c);
     } elsif (($handle eq '') && ($userdom ne '')) {
-        my $c = new CGI::Cookie(-name    => 'lonID',
-                                -value   => '',
-                                -expires => '-10y',);
-        $r->headers_out->add('Set-cookie' => $c);
+        my %cookies=CGI::Cookie->parse($r->header_in('Cookie'));
+        foreach my $name (keys(%cookies)) {
+            next unless ($name =~ /^lon(|S|Link|Pub)ID$/);
+            my $c = new CGI::Cookie(-name    => $name,
+                                    -value   => '',
+                                    -expires => '-10y',);
+            $r->headers_out->add('Set-cookie' => $c);
+        }
     }
     $r->send_http_header;
     return OK if $r->header_only;




More information about the LON-CAPA-cvs mailing list