Diff for /loncom/auth/lonacc.pm between versions 1.69 and 1.71

version 1.69, 2005/11/23 20:46:04 version 1.71, 2005/12/14 16:50:59
Line 44  sub handler { Line 44  sub handler {
     my %cookies=CGI::Cookie->parse($r->header_in('Cookie'));      my %cookies=CGI::Cookie->parse($r->header_in('Cookie'));
     my $lonid=$cookies{'lonID'};      my $lonid=$cookies{'lonID'};
     my $cookie;      my $cookie;
       my $lonidsdir=$r->dir_config('lonIDsDir');
   
       my $handle;
     if ($lonid) {      if ($lonid) {
  my $handle=$lonid->value;   $handle=$lonid->value;
         $handle=~s/\W//g;          $handle=~s/\W//g;
         my $lonidsdir=$r->dir_config('lonIDsDir');      }
         
       if ($r->user 
    && (!$lonid || !-e "$lonidsdir/$handle.id" || $handle eq '') ) {
    my $domain = $r->dir_config('lonDefDomain');
    my $home=&Apache::lonnet::homeserver($r->user,$domain);
    if ($home !~ /(con_lost|no_such_host)/) {
       $handle=&Apache::lonauth::success($r,$r->user,$domain,
        $home,'noredirect');
       $r->header_out('Set-cookie',"lonID=$handle; path=/");
    }
       }
   
       if ($r->dir_config("lonBalancer") eq 'yes') {
    $r->set_handlers('PerlResponseHandler'=>
    [\&Apache::switchserver::handler]);
       }
   
       if ($handle ne '') {
         if ((-e "$lonidsdir/$handle.id") && ($handle ne '')) {          if ((-e "$lonidsdir/$handle.id") && ($handle ne '')) {
   
 # ------------------------------------------------------ Initialize Environment  # ------------------------------------------------------ Initialize Environment
Line 167  sub handler { Line 188  sub handler {
     if ($requrl=~m|^/public/|      if ($requrl=~m|^/public/|
  || (&Apache::lonnet::metadata($requrl,'copyright') eq 'public')) {   || (&Apache::lonnet::metadata($requrl,'copyright') eq 'public')) {
         &Apache::lonnet::logthis('Granting public access: '.$requrl);          &Apache::lonnet::logthis('Granting public access: '.$requrl);
           &Apache::lonlocal::get_language_handle($r);
  my $cookie=   my $cookie=
     &Apache::lonauth::success($r,'public','public','public');      &Apache::lonauth::success($r,'public','public','public');
         my $lonidsdir=$r->dir_config('lonIDsDir');          my $lonidsdir=$r->dir_config('lonIDsDir');

Removed from v.1.69  
changed lines
  Added in v.1.71


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>