aboutsummaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authorjustdave%syndicomm.com <>2001-06-06 10:16:47 +0000
committerjustdave%syndicomm.com <>2001-06-06 10:16:47 +0000
commit45b240a6124c67436cea18f90e4a3330ba819441 (patch)
tree58dca82545d919f126c15ca7c426a87da61a9cf1 /post_bug.cgi
parent24bf6d11edd72edd34b5effa68aad9ca0984e913 (diff)
downloadbugs-45b240a6124c67436cea18f90e4a3330ba819441.tar
bugs-45b240a6124c67436cea18f90e4a3330ba819441.tar.gz
bugs-45b240a6124c67436cea18f90e4a3330ba819441.tar.bz2
bugs-45b240a6124c67436cea18f90e4a3330ba819441.tar.xz
bugs-45b240a6124c67436cea18f90e4a3330ba819441.zip
Fix for bug 75482: adding the capability to deactivate a group without deleting it (prevent new bugs from being placed into that group, but don't remove the group restriction from bugs already in it).
Patch by Myk Melez <myk@mozilla.org> r= justdave@syndicomm.com
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi11
1 files changed, 11 insertions, 0 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 90ca32f52..68842b646 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -207,6 +207,17 @@ $query .= "now(), 0";
foreach my $b (grep(/^bit-\d*$/, keys %::FORM)) {
if ($::FORM{$b}) {
my $v = substr($b, 4);
+ $v =~ /^(\d+)$/
+ || PuntTryAgain("One of the group bits submitted was invalid.");
+ if (!GroupIsActive($v)) {
+ # Prevent the user from adding the bug to an inactive group.
+ # Should only happen if there is a bug in Bugzilla or the user
+ # hacked the "enter bug" form since otherwise the UI
+ # for adding the bug to the group won't appear on that form.
+ PuntTryAgain("You can't add this bug to the inactive group " .
+ "identified by the bit '$v'. This shouldn't happen, " .
+ "so it may indicate a bug in Bugzilla.");
+ }
$query .= " + $v"; # Carefully written so that the math is
# done by MySQL, which can handle 64-bit math,
# and not by Perl, which I *think* can not.