[LON-CAPA-cvs] cvs: loncom /auth lonacc.pm
raeburn
raeburn@source.lon-capa.org
Thu, 23 Jul 2009 18:45:39 -0000
raeburn Thu Jul 23 18:45:39 2009 EDT
Modified files:
/loncom/auth lonacc.pm
Log:
- loncommon::get_unprocessed_cgi() retrieve roles and symb from query string.
- Now passed along in %env to support case where lonBalancer is "yes" and
switchserver offloads session.
Index: loncom/auth/lonacc.pm
diff -u loncom/auth/lonacc.pm:1.126 loncom/auth/lonacc.pm:1.127
--- loncom/auth/lonacc.pm:1.126 Thu Jul 23 17:40:29 2009
+++ loncom/auth/lonacc.pm Thu Jul 23 18:45:39 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Cookie Based Access Handler
#
-# $Id: lonacc.pm,v 1.126 2009/07/23 17:40:29 raeburn Exp $
+# $Id: lonacc.pm,v 1.127 2009/07/23 18:45:39 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -281,13 +281,11 @@
my $query = $r->args;
my %form;
if ($query) {
- foreach my $pair (split(/&/,$query)) {
- my ($name, $value) = split(/=/,$pair);
- $name = &unescape($name);
- if (($name eq 'role') || ($name eq 'symb')) {
- $value =~ tr/+/ /;
- $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
- $form{$name} = $value;
+ my @items = ('role','symb');
+ &Apache::loncommon::get_unprocessed_cgi($query,\@items);
+ foreach my $item (@items) {
+ if (defined($env{'form.'.$item})) {
+ $form{$item} = $env{'form.'.$item};
}
}
}
@@ -299,7 +297,7 @@
if ($r->dir_config("lonBalancer") eq 'yes') {
# login but immeaditly go to switch server to find us a new
# machine
- &Apache::lonauth::success($r,$user,$domain,$home,'noredirect','',\%form);
+ &Apache::lonauth::success($r,$user,$domain,$home,'noredirect');
$env{'request.sso.login'} = 1;
if (defined($r->dir_config("lonSSOReloginServer"))) {
$env{'request.sso.reloginserver'} =