Diff for /loncom/auth/loncacc.pm between versions 1.38 and 1.42

version 1.38, 2005/04/07 06:56:21 version 1.42, 2006/11/23 01:49:41
Line 31  package Apache::loncacc; Line 31  package Apache::loncacc;
   
 use strict;  use strict;
 use Apache::Constants qw(:common :http :methods REDIRECT);  use Apache::Constants qw(:common :http :methods REDIRECT);
 use Apache::File;  
 use CGI::Cookie();  use CGI::Cookie();
 use Fcntl qw(:flock);  use Fcntl qw(:flock);
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::lonnet;  use Apache::lonnet;
   use Apache::lonacc;
   
 sub constructaccess {  sub constructaccess {
     my ($url,$ownerdomain)=@_;      my ($url,$ownerdomain)=@_;
Line 54  sub constructaccess { Line 53  sub constructaccess {
     }      }
           
     foreach my $domain (@possibledomains) {      foreach my $domain (@possibledomains) {
  my $capriv='user.priv.ca./'.$domain.'/'.$ownername.'./';   if (exists($env{'user.priv.ca./'.$domain.'/'.$ownername.'./'}) ||
  foreach (keys %env) {      exists($env{'user.priv.aa./'.$domain.'/'.$ownername.'./'}) ) {
     if ($_ eq $capriv) {      return ($ownername,$domain);
  return ($ownername,$domain);  
     }  
  }   }
     }      }
     return '';      return '';
Line 72  sub handler { Line 69  sub handler {
     my $lonid=$cookies{'lonID'};      my $lonid=$cookies{'lonID'};
     my $cookie;      my $cookie;
     if ($lonid) {      if ($lonid) {
  my $handle=$lonid->value;        my $handle=&LONCAPA::clean_handle($lonid->value);
         $handle=~s/\W//g;  
         my $lonidsdir=$r->dir_config('lonIDsDir');          my $lonidsdir=$r->dir_config('lonIDsDir');
         if ((-e "$lonidsdir/$handle.id") && ($handle ne '')) {          if ((-e "$lonidsdir/$handle.id") && ($handle ne '')) {
   
Line 97  sub handler { Line 93  sub handler {
   
 # -------------------------------------------------------- Load POST parameters  # -------------------------------------------------------- Load POST parameters
   
     &Apache::loncommon::get_posted_cgi($r);      &Apache::lonacc::get_posted_cgi($r);
   
             return OK;               return OK; 
         } else {           } else { 

Removed from v.1.38  
changed lines
  Added in v.1.42


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