--- loncom/auth/lonacc.pm 2006/09/19 20:36:27 1.101 +++ loncom/auth/lonacc.pm 2007/01/08 15:54:23 1.104 @@ -1,7 +1,7 @@ # The LearningOnline Network # Cookie Based Access Handler # -# $Id: lonacc.pm,v 1.101 2006/09/19 20:36:27 albertel Exp $ +# $Id: lonacc.pm,v 1.104 2007/01/08 15:54:23 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -36,6 +36,7 @@ use Apache::lonnet; use Apache::loncommon(); use Apache::lonlocal; use Apache::restrictedaccess(); +use Apache::blockedaccess(); use CGI::Cookie(); use Fcntl qw(:flock); use LONCAPA; @@ -183,6 +184,8 @@ sub sso_login { } return OK; } elsif (defined($r->dir_config('lonSSOUserUnknownRedirect'))) { + $r->subprocess_env->set('SSOUserUnknown' => $user); + $r->subprocess_env->set('SSOUserDomain' => $domain); $r->internal_redirect($r->dir_config('lonSSOUserUnknownRedirect')); $r->set_handlers('PerlHandler'=> undef); return OK; @@ -200,8 +203,7 @@ sub handler { my $handle; if ($lonid) { - $handle=$lonid->value; - $handle=~s/\W//g; + $handle=&LONCAPA::clean_handle($lonid->value); } my $result = &sso_login($r,$lonid,$handle); @@ -257,6 +259,10 @@ sub handler { &Apache::restrictedaccess::setup_handler($r); return OK; } + if ($access eq 'B') { + &Apache::blockedaccess::setup_handler($r); + return OK; + } if (($access ne '2') && ($access ne 'F')) { $env{'user.error.msg'}="$requrl:bre:1:1:Access Denied"; return HTTP_NOT_ACCEPTABLE;