aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortravis%sedsystems.ca <>2005-01-08 04:25:19 +0000
committertravis%sedsystems.ca <>2005-01-08 04:25:19 +0000
commitd6e7117d0ff4a6674a186f443219f56c0bb5bab8 (patch)
tree979b54567debb0f23988067c151700120f9da20e /post_bug.cgi
parentBug 272620: avoid XSS problem with internal error messages. Patch by gerv; r=... (diff)
downloadbugzilla-d6e7117d0ff4a6674a186f443219f56c0bb5bab8.tar.gz
bugzilla-d6e7117d0ff4a6674a186f443219f56c0bb5bab8.tar.bz2
bugzilla-d6e7117d0ff4a6674a186f443219f56c0bb5bab8.zip
Bug 276446: Initial description cannot be made private on new bug creation
Patch: travis r=joini a=justdave
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi12
1 files changed, 9 insertions, 3 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 7282f8fa9..27f870e13 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -419,9 +419,15 @@ foreach my $grouptoadd (@groupstoadd) {
VALUES ($id, $grouptoadd)");
}
-# Add the comment
-SendSQL("INSERT INTO longdescs (bug_id, who, bug_when, thetext)
- VALUES ($id, $::userid, now(), " . SqlQuote($comment) . ")");
+# Add the initial comment, allowing for the fact that it may be private
+my $privacy = 0;
+if (Param("insidergroup") && UserInGroup(Param("insidergroup"))) {
+ $privacy = $::FORM{'commentprivacy'} ? 1 : 0;
+}
+
+SendSQL("INSERT INTO longdescs (bug_id, who, bug_when, thetext, isprivate)
+ VALUES ($id, " . SqlQuote($user->id) . ", " . SqlQuote($timestamp) .
+ ", " . SqlQuote($comment) . ", $privacy)");
# Insert the cclist into the database
foreach my $ccid (keys(%ccids)) {