Diff for /loncom/auth/checkauthen.pm between versions 1.7 and 1.11

version 1.7, 2006/09/07 17:07:26 version 1.11, 2007/04/11 21:36:58
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 59  sub handler { Line 63  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 $handle;
     if ($lonid) {      if ($lonid) {
  my $handle=$lonid->value;        $handle=&LONCAPA::clean_handle($lonid->value);
         $handle=~s/\W//g;          $handle = $r->dir_config('lonIDsDir')."/$handle.id";
         my $lonidsdir=$r->dir_config('lonIDsDir');      } else {
         if ((-e "$lonidsdir/$handle.id") && ($handle ne '')) {              $handle = $env{'user.environment'};
     return OK;  
  }  
     }      }
   
       if (($handle ne '') && (-e $handle)) {
           return OK;
       }
   
     return $fail;      return $fail;
 }  }
   

Removed from v.1.7  
changed lines
  Added in v.1.11


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