diff options
Diffstat (limited to 'Bugzilla/Group.pm')
-rw-r--r-- | Bugzilla/Group.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Bugzilla/Group.pm b/Bugzilla/Group.pm index 61c085c0e..481987488 100644 --- a/Bugzilla/Group.pm +++ b/Bugzilla/Group.pm @@ -482,6 +482,12 @@ sub _check_description { sub _check_user_regexp { my ($invocant, $regex) = @_; $regex = trim($regex) || ''; + + my $max_length = Bugzilla->dbh->bz_column_length( 'groups', 'userregexp' ); + ThrowUserError( "group_regexp_too_long", + { text => $regex, max_length => $max_length } ) + if length($regex) > $max_length; + ThrowUserError("invalid_regexp") unless (eval {qr/$regex/}); return $regex; } |