--- loncom/auth/lonacc.pm 2014/10/04 02:59:32 1.158 +++ loncom/auth/lonacc.pm 2014/10/18 21:40:06 1.159 @@ -1,7 +1,7 @@ # The LearningOnline Network # Cookie Based Access Handler # -# $Id: lonacc.pm,v 1.158 2014/10/04 02:59:32 raeburn Exp $ +# $Id: lonacc.pm,v 1.159 2014/10/18 21:40:06 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -445,7 +445,10 @@ sub handler { my ($is_balancer,$otherserver); if ($handle eq '') { - unless (($requrl eq '/adm/switchserver') && (!$r->is_initial_req())) { + unless ((($requrl eq '/adm/switchserver') && (!$r->is_initial_req())) || + ($requrl =~ m{^/public/$match_domain/$match_courseid/syllabus}) || + ($requrl =~ m{^/adm/help/}) || + ($requrl =~ m{^/res/$match_domain/$match_username/})) { $r->log_reason("Cookie not valid", $r->filename); } } elsif ($handle ne '') { @@ -566,6 +569,13 @@ sub handler { if ($requrl !~ m{^/(?:adm|public|prtspool)/} || $requrl =~ /^\/adm\/.*\/(smppg|bulletinboard)(\?|$ )/x) { my $access=&Apache::lonnet::allowed('bre',$requrl); + if ($handle eq '') { + unless ($access eq 'F') { + if ($requrl =~ m{^/res/$match_domain/$match_username/}) { + $r->log_reason("Cookie not valid", $r->filename); + } + } + } if ($access eq '1') { $env{'user.error.msg'}="$requrl:bre:0:0:Choose Course"; return HTTP_NOT_ACCEPTABLE;