aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-08-14 00:04:03 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2015-08-14 00:04:03 +0200
commit9810308e5797660d7a66b1156590c952169eac32 (patch)
tree9c0e59397cc6e72135711e9486058f5354c554e1 /Bugzilla/Bug.pm
parentcaaec1d30afa4db6f3717833b9a85698a6bea1e1 (diff)
downloadbugs-9810308e5797660d7a66b1156590c952169eac32.tar
bugs-9810308e5797660d7a66b1156590c952169eac32.tar.gz
bugs-9810308e5797660d7a66b1156590c952169eac32.tar.bz2
bugs-9810308e5797660d7a66b1156590c952169eac32.tar.xz
bugs-9810308e5797660d7a66b1156590c952169eac32.zip
Bug 1191937: If a bug comment contains a reference to a very large bug ID, the bug is no longer viewable with PostgreSQL
r=gerv a=sgreen
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r--Bugzilla/Bug.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index bfc2fe0d9..25f74d5f3 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -533,7 +533,7 @@ sub _preload_referenced_bugs {
my $referenced_bugs = Bugzilla::Bug->new_from_list(\@ref_bug_ids);
$_->object_cache_set() foreach @$referenced_bugs;
- return $referenced_bug_ids
+ return $referenced_bug_ids;
}
# Extract bug IDs mentioned in comments. This is much faster than calling quoteUrls().
@@ -566,6 +566,8 @@ sub _extract_bug_ids {
# Old duplicate markers
push @bug_ids, $text =~ /(?<=^\*\*\*\ This\ bug\ has\ been\ marked\ as\ a\ duplicate\ of\ )(\d+)(?=\ \*\*\*\Z)/;
}
+ # Make sure to filter invalid bug IDs.
+ @bug_ids = grep { $_ < MAX_INT_32 } @bug_ids;
return [uniq @bug_ids];
}