--- loncom/auth/publiccheck.pm 2006/07/21 19:42:12 1.9 +++ loncom/auth/publiccheck.pm 2006/12/11 14:06:04 1.12 @@ -1,7 +1,7 @@ # The LearningOnline Network # Cookie Based Access Handler # -# $Id: publiccheck.pm,v 1.9 2006/07/21 19:42:12 albertel Exp $ +# $Id: publiccheck.pm,v 1.12 2006/12/11 14:06:04 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -45,8 +45,7 @@ sub handler { my %cookies=CGI::Cookie->parse($r->header_in('Cookie')); my $lonid=$cookies{'lonID'}; if ($lonid) { - my $handle=$lonid->value; - $handle=~s/\W//g; + my $handle=&LONCAPA::clean_handle($lonid->value); my $lonidsdir=$r->dir_config('lonIDsDir'); if ((-e "$lonidsdir/$handle.id") && ($handle ne '')) { &Apache::lonnet::transfer_profile_to_env($lonidsdir,$handle); @@ -58,6 +57,7 @@ sub handler { } if ($requrl=~m|^/public/| || $requrl=~m|^/adm/help/.*\.hlp$| + || $requrl=~m|^/adm/[^/]+/[^/]+/aboutme/portfolio$| || (&Apache::lonnet::metadata($requrl,'copyright') eq 'public')) { &process_public($r,$requrl); return OK; @@ -72,6 +72,9 @@ sub handler { } elsif ($requrl eq '/adm/restrictedaccess') { &process_public($r,$requrl); return OK; + } elsif ($requrl eq '/adm/blockedaccess') { + &process_public($r,$requrl); + return OK; } return DECLINED; }