From: Frédéric Buclin Date: Tue, 24 Sep 2013 09:32:53 +0000 (+0200) Subject: Temporary fix for bug 916882: whitelist product and component when used with the... X-Git-Tag: bugzilla-4.4.1~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=378f60e215fab2036ab356c96d29823c0bbed18d;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 5b437afec8..83961e12b0 100644 --- a/Bugzilla/Search/ClauseGroup.pm +++ b/Bugzilla/Search/ClauseGroup.pm @@ -65,7 +65,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);