From: Frédéric Buclin Date: Tue, 24 Sep 2013 09:29:49 +0000 (+0200) Subject: Temporary fix for bug 916882: whitelist product and component when used with the... X-Git-Tag: bugzilla-4.5.1~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21c92686705e558b3105cf3b8d9ac9ad8e46e4f6;p=thirdparty%2Fbugzilla.git Temporary fix for bug 916882: whitelist product and component when used with the changed* operators r/a=glob --- diff --git a/Bugzilla/Search/ClauseGroup.pm b/Bugzilla/Search/ClauseGroup.pm index a50dc4fb37..eb306525c2 100644 --- a/Bugzilla/Search/ClauseGroup.pm +++ b/Bugzilla/Search/ClauseGroup.pm @@ -66,7 +66,10 @@ sub add { # Unsupported fields if (grep { $_ eq $field } UNSUPPORTED_FIELDS ) { - ThrowUserError('search_grouped_field_invalid', { field => $field }); + # XXX - Hack till bug 916882 is fixed. + my $operator = scalar(@args) == 3 ? $args[1] : $args[0]->{operator}; + ThrowUserError('search_grouped_field_invalid', { field => $field }) + unless (($field eq 'product' || $field eq 'component') && $operator =~ /^changed/); } $self->SUPER::add(@args);