[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /auth lonacc.pm
raeburn
raeburn at source.lon-capa.org
Fri Oct 23 17:33:46 EDT 2020
raeburn Fri Oct 23 21:33:46 2020 EDT
Modified files: (Branch: version_2_11_X)
/loncom/auth lonacc.pm
Log:
- For 2.11
Backport 1.183
Index: loncom/auth/lonacc.pm
diff -u loncom/auth/lonacc.pm:1.159.2.14 loncom/auth/lonacc.pm:1.159.2.15
--- loncom/auth/lonacc.pm:1.159.2.14 Tue Oct 6 17:39:04 2020
+++ loncom/auth/lonacc.pm Fri Oct 23 21:33:46 2020
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Cookie Based Access Handler
#
-# $Id: lonacc.pm,v 1.159.2.14 2020/10/06 17:39:04 raeburn Exp $
+# $Id: lonacc.pm,v 1.159.2.15 2020/10/23 21:33:46 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -563,31 +563,27 @@
if ($env{'user.noloadbalance'} eq $r->dir_config('lonHostID')) {
$checkexempt = 1;
}
- unless ($checkexempt) {
+ unless (($checkexempt) || (($requrl eq '/adm/switchserver') && (!$r->is_initial_req()))) {
($is_balancer,$otherserver) =
&Apache::lonnet::check_loadbalancing($env{'user.name'},
$env{'user.domain'});
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)
- 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_/)) {
- $otherserver = $found_server;
- }
+ # 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);
+ if (($found_server) && ($balancer_cookie =~ /^\Q$env{'user.domain'}\E_\Q$env{'user.name'}\E_/)) {
+ $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 '') {
$env{'form.otherserver'} = $otherserver;
}
- }
- unless (($env{'form.origurl'}) || ($r->uri eq '/adm/roles') ||
- ($r->uri eq '/adm/switchserver') || ($r->uri eq '/adm/sso')) {
- $env{'form.origurl'} = $r->uri;
+ unless (($env{'form.origurl'}) || ($r->uri eq '/adm/roles') ||
+ ($r->uri eq '/adm/switchserver') || ($r->uri eq '/adm/sso')) {
+ $env{'form.origurl'} = $r->uri;
+ }
}
}
More information about the LON-CAPA-cvs
mailing list