From 64de78c1565cd071c82fd92bc199965d91f9a8ae Mon Sep 17 00:00:00 2001 From: Jaimos Skriletz Date: Sun, 24 Nov 2024 10:32:27 -0700 Subject: [PATCH] Fix invalid regex by moving hyphen to last character. --- lib/WeBWorK/ContentGenerator/CourseAdmin.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WeBWorK/ContentGenerator/CourseAdmin.pm b/lib/WeBWorK/ContentGenerator/CourseAdmin.pm index 7c8301c050..c87566a8f5 100644 --- a/lib/WeBWorK/ContentGenerator/CourseAdmin.pm +++ b/lib/WeBWorK/ContentGenerator/CourseAdmin.pm @@ -270,7 +270,7 @@ sub add_course_validate ($c) { for (1 .. $number_of_additional_users) { my $userID = trim_spaces($c->param("add_initial_userID_$_")) || ''; - unless ($userID =~ /^[\w-.,]*$/) { + unless ($userID =~ /^[\w.,-]*$/) { push @errors, $c->maketext( 'User ID number [_1] may only contain letters, numbers, hyphens, periods, commas, '