Diff for /loncom/auth/checkauthen.pm between versions 1.8 and 1.13

version 1.8, 2006/09/19 15:18:54 version 1.13, 2012/04/18 18:55:06
Line 36  use Apache::lonnet; Line 36  use Apache::lonnet;
 sub handler {  sub handler {
     my ($r) = @_;      my ($r) = @_;
   
       if (&Apache::lonnet::is_domainimage($r->uri)) {
           return OK;
       }
   
     if ($r->auth_type() ne 'LONCAPA') {      if ($r->auth_type() ne 'LONCAPA') {
  return DECLINED;   return DECLINED;
     }      }
Line 57  sub handler { Line 61  sub handler {
  }   }
     }      }
   
     my %cookies=CGI::Cookie->parse($r->header_in('Cookie'));      my $handle = &Apache::lonnet::check_for_valid_session($r);
     my $lonid=$cookies{'lonID'};      if ($handle eq '') {
     my $handle;  
     if ($lonid) {  
         my $handle = $lonid->value;  
         $handle=~s/\W//g;  
         $handle = $r->dir_config('lonIDsDir')."/$handle.id";  
     } else {  
         $handle = $env{'user.environment'};          $handle = $env{'user.environment'};
     }      }
   
     if (($handle ne '') && (-e $handle)) {      if ($handle ne '') {
         return OK;          return OK;
     }      }
       if (($fail == FORBIDDEN) && ($r->uri eq '/adm/email')) {
           $env{'form.firsturl'} = $r->uri;
       }
     return $fail;      return $fail;
 }  }
   

Removed from v.1.8  
changed lines
  Added in v.1.13


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