[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /auth migrateuser.pm
raeburn
raeburn at source.lon-capa.org
Fri Oct 23 16:58:08 EDT 2020
raeburn Fri Oct 23 20:58:08 2020 EDT
Modified files: (Branch: version_2_11_X)
/loncom/auth migrateuser.pm
Log:
- For 2.11
Backport 1.48
Index: loncom/auth/migrateuser.pm
diff -u loncom/auth/migrateuser.pm:1.25.2.2 loncom/auth/migrateuser.pm:1.25.2.3
--- loncom/auth/migrateuser.pm:1.25.2.2 Sat May 2 17:35:40 2020
+++ loncom/auth/migrateuser.pm Fri Oct 23 20:58:08 2020
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Starts a user off based of an existing token.
#
-# $Id: migrateuser.pm,v 1.25.2.2 2020/05/02 17:35:40 raeburn Exp $
+# $Id: migrateuser.pm,v 1.25.2.3 2020/10/23 20:58:08 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -255,6 +255,20 @@
} else {
$extra_env = { 'request.balancercookie' => $data{'server'}.':'.$data{'balcookie'} };
}
+ } elsif (($data{'server'}) && ($data{'otherbalcookie'})) {
+ my ($balancer,$balcookie) = split(/:/,$data{'otherbalcookie'});
+ if (defined(&Apache::lonnet::hostname($balancer)) && $balcookie =~ /^[a-f0-9]{32}$/) {
+ my $baldom = &Apache::lonnet::host_domain($balancer);
+ if (&Apache::lonnet::shared_institution($baldom)) {
+ my $cookieid = join('_',$udom,$data{'username'},$balcookie);
+ &Apache::lonnet::updatebalcookie($cookieid,$balancer,$data{'server'});
+ if (ref($extra_env) eq 'HASH') {
+ $extra_env->{'request.balancercookie'} = $data{'otherbalcookie'};
+ } else {
+ $extra_env = { 'request.balancercookie' => $data{'otherbalcookie'} };
+ }
+ }
+ }
}
my (%form,$cid);
More information about the LON-CAPA-cvs
mailing list