]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Temporary fix for bug 916882: whitelist product and component when used with the...
authorFrédéric Buclin <LpSolit@gmail.com>
Tue, 24 Sep 2013 09:32:53 +0000 (11:32 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 24 Sep 2013 09:32:53 +0000 (11:32 +0200)
r/a=glob

Bugzilla/Search/ClauseGroup.pm

index 5b437afec8d571d494b1d486c7b2961c299584c2..83961e12b08d5bcae36b2e84774a6895eaa2f537 100644 (file)
@@ -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);