Diff for /loncom/auth/lonacc.pm between versions 1.159.2.14 and 1.159.2.16

version 1.159.2.14, 2020/10/06 17:39:04 version 1.159.2.16, 2020/12/22 23:53:36
Line 563  sub handler { Line 563  sub handler {
         if ($env{'user.noloadbalance'} eq $r->dir_config('lonHostID')) {          if ($env{'user.noloadbalance'} eq $r->dir_config('lonHostID')) {
             $checkexempt = 1;              $checkexempt = 1;
         }          }
         unless ($checkexempt) {          unless (($checkexempt) || (($requrl eq '/adm/switchserver') && (!$r->is_initial_req()))) {
             ($is_balancer,$otherserver) =              ($is_balancer,$otherserver) =
                 &Apache::lonnet::check_loadbalancing($env{'user.name'},                  &Apache::lonnet::check_loadbalancing($env{'user.name'},
                                                      $env{'user.domain'});                                                       $env{'user.domain'});
             if ($is_balancer) {              if ($is_balancer) {
                 unless (($requrl eq '/adm/switchserver') && (!$r->is_initial_req())) {                  # Check if browser sent a LON-CAPA load balancer cookie (and this is a balancer)
                     # Check if browser sent a LON-CAPA load balancer cookie (and this is a balancer)                  my ($found_server,$balancer_cookie) = &Apache::lonnet::check_for_balancer_cookie($r);
                     my ($found_server,$balancer_cookie) = &Apache::lonnet::check_for_balancer_cookie($r);                  if (($found_server) && ($balancer_cookie =~ /^\Q$env{'user.domain'}\E_\Q$env{'user.name'}\E_/)) {
                     if (($found_server) && ($balancer_cookie =~ /^\Q$env{'user.domain'}\E_\Q$env{'user.name'}\E_/)) {                      $otherserver = $found_server;
                         $otherserver = $found_server;                  }
                     }                  unless ($requrl eq '/adm/switchserver') {
                       $r->set_handlers('PerlResponseHandler'=>
                                        [\&Apache::switchserver::handler]);
                 }                  }
             }  
         }  
         if ($is_balancer) {  
             unless (($requrl eq '/adm/switchserver') && (!$r->is_initial_req())) {  
                 $r->set_handlers('PerlResponseHandler'=>  
                                  [\&Apache::switchserver::handler]);  
                 if ($otherserver ne '') {                  if ($otherserver ne '') {
                     $env{'form.otherserver'} = $otherserver;                      $env{'form.otherserver'} = $otherserver;
                 }                  }
             }                  unless (($env{'form.origurl'}) || ($r->uri eq '/adm/roles') ||
             unless (($env{'form.origurl'}) || ($r->uri eq '/adm/roles') ||                          ($r->uri eq '/adm/switchserver') || ($r->uri eq '/adm/sso')) {
                     ($r->uri eq '/adm/switchserver') || ($r->uri eq '/adm/sso')) {                      $env{'form.origurl'} = $r->uri;
                 $env{'form.origurl'} = $r->uri;                  }
             }              }
         }          }
   
 # ---------------------------------------------------------------- Check access  # ---------------------------------------------------------------- Check access
  my $now = time;   my $now = time;
         my $check_symb;          my ($check_symb,$check_access);
  if ($requrl !~ m{^/(?:adm|public|(?:prt|zip)spool)/}   if ($requrl !~ m{^/(?:adm|public|(?:prt|zip)spool)/}
     || $requrl =~ /^\/adm\/.*\/(smppg|bulletinboard)(\?|$ )/x) {      || $requrl =~ /^\/adm\/.*\/(smppg|bulletinboard)(\?|$ )/x) {
             my ($access,$poss_symb);              $check_access = 1;
             if (($env{'request.course.id'}) && (!$suppext)) {          }
                 $requrl=~/\.(\w+)$/;          if (($env{'request.course.id'}) && (!$suppext)) {
                 if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') ||              $requrl=~/\.(\w+)$/;
                     ($requrl=~/^\/adm\/.*\/(aboutme|smppg|bulletinboard)(\?|$ )/x) ||              if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') ||
                     ($requrl=~/^\/adm\/wrapper\//) ||                  ($requrl=~/^\/adm\/.*\/(aboutme|smppg|bulletinboard)(\?|$ )/x) ||
                     ($requrl=~m|^/adm/coursedocs/showdoc/|) ||                  ($requrl=~/^\/adm\/wrapper\//) ||
                     ($requrl=~m|\.problem/smpedit$|) ||                  ($requrl=~m|^/adm/coursedocs/showdoc/|) ||
                     ($requrl=~/^\/public\/.*\/syllabus$/) ||                  ($requrl=~m|\.problem/smpedit$|) ||
                     ($requrl=~/^\/adm\/(viewclasslist|navmaps)$/) ||                  ($requrl=~/^\/public\/.*\/syllabus$/) ||
                     ($requrl=~/^\/adm\/.*\/aboutme\/portfolio(\?|$)/)) {                  ($requrl=~/^\/adm\/(viewclasslist|navmaps)$/) ||
                     $check_symb = 1;                  ($requrl=~/^\/adm\/.*\/aboutme\/portfolio(\?|$)/)) {
                 }                  $check_symb = 1;
             }              }
           }
           if ($check_access) {
               my ($access,$poss_symb);
             if ($check_symb) {              if ($check_symb) {
                 if ($env{'form.symb'}) {                  if ($env{'form.symb'}) {
                     $poss_symb=&Apache::lonnet::symbclean($env{'form.symb'});                      $poss_symb=&Apache::lonnet::symbclean($env{'form.symb'});

Removed from v.1.159.2.14  
changed lines
  Added in v.1.159.2.16


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>
500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.