Log Message:
-----------
HEAD backport: Adds checks to make sure that the multiple user problem
is really gone (gage)
Tags:
----
rel-2-1-patches
Modified Files:
--------------
webwork2/lib/WeBWorK:
Authen.pm
Revision Data
-------------
Index: Authen.pm
===================================================================
RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/Authen.pm,v
retrieving revision 1.35.2.2
retrieving revision 1.35.2.3
diff -Llib/WeBWorK/Authen.pm -Llib/WeBWorK/Authen.pm -u -r1.35.2.2 -r1.35.2.3
--- lib/WeBWorK/Authen.pm
+++ lib/WeBWorK/Authen.pm
@@ -196,7 +196,8 @@
my $force_passwd_authen = $r->param('force_passwd_authen');
my $login_practice_user = $r->param('login_practice_user');
my $send_cookie = $r->param("send_cookie");
-
+ my @temp_users = $r->param("user");
+ warn "users start out as ", join(" ", @temp_users) if @temp_users >1;
my $error;
my $failWithoutError = 0;
my $credentialSource = "params";
@@ -240,6 +241,7 @@
$user = $cookieUser;
$key = $cookieKey;
$r->param("user", $user);
+ #$r->args->{user} = $user;
$r->param("key", $key);
$credentialSource = "cookie";
} else {
@@ -384,6 +386,18 @@
# neither a key or a password were supplied.
$error = "You must enter a password."
}
+ #############################################
+ # Check for multiply defined users
+ ############################################
+ my @test_users = $r->param("user");
+ if (@test_users>1) {
+ warn "User has been multiply defined in Authen.pm ", join(" ", @test_users) ;
+ $r->param("user"=>$test_users[0]);
+ @test_users = $r->param("user");
+ warn "New value of user is ", join(" ", @test_users);
+ }
+ ##### end check ######################
+
if (defined $error) {
# authentication failed, store the error message
|