From: Mike G. v. a. <we...@ma...> - 2010-05-14 01:16:21
|
Log Message: ----------- Try to catch user_id's with bad characters -- not sure this is successful yet. Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: UserList.pm Revision Data ------------- Index: UserList.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/UserList.pm,v retrieving revision 1.95 retrieving revision 1.96 diff -Llib/WeBWorK/ContentGenerator/Instructor/UserList.pm -Llib/WeBWorK/ContentGenerator/Instructor/UserList.pm -u -r1.95 -r1.96 --- lib/WeBWorK/ContentGenerator/Instructor/UserList.pm +++ lib/WeBWorK/ContentGenerator/Instructor/UserList.pm @@ -69,6 +69,7 @@ #use CGI qw(-nosticky ); use WeBWorK::CGI; use WeBWorK::File::Classlist; +use WeBWorK::DB; use WeBWorK::Utils qw(readFile readDirectory cryptPassword); use constant HIDE_USERS_THRESHHOLD => 200; use constant EDIT_FORMS => [qw(cancelEdit saveEdit)]; @@ -1328,6 +1329,10 @@ my %record = %$record; my $user_id = $record{user_id}; + unless (WeBWorK::DB::check_user_id($user_id) ) { # try to catch lines with bad characters + push @skipped, $user_id; + next; + } if ($user_id eq $user) { # don't replace yourself!! push @skipped, $user_id; next; |