new_comment.cgi allows blank lines and extraineous spaces

VERIFIED FIXED in Bugzilla old

Status

()

P2
trivial
VERIFIED FIXED
20 years ago
6 years ago

People

(Reporter: jay, Assigned: tara)

Tracking

unspecified
Bugzilla old
All
Solaris

Details

(Reporter)

Description

20 years ago
new_comment allows blank entries into the comment file. to forces something from
the user, try this patch: (it also strings ^$ spaces).

--- new_comment.cgi.ORIG Thu Oct 15 16:52:27 1998
+++ new_comment.cgi     Thu Oct 15 18:01:45 1998
@@ -28,11 +28,20 @@
     ($name, $value) = split(/=/, $pair);

     $value =~ tr/+/ /;
+    $value =~ s/^(\s*)//s;
+    $value =~ s/(\s*)$//s;
     $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
     $FORM{$name} = $value;
 }
-open(COMMENTS, ">>data/comments");
 $c=$FORM{"comment"};
+if ( (!defined $c) || ($c eq '') ) {
+    print "Content-type: text/html\n\n";
+    print "<TITLE>Nothing on your mind?</TITLE>";
+    print "<H1>Does you mind draw a blank?</H1>";
+    exit 0;
+}
+
+open(COMMENTS, ">>data/comments");
 print COMMENTS $FORM{"comment"} . "\n";
 close(COMMENTS);
 print "Content-type: text/html\n\n";

Comment 1

20 years ago
Reassigning to dmose@mozilla.org, who now has front-line responsibility for
all Bonsai and Bugzilla bugs.

Comment 2

20 years ago
Reassigning back to me.  That stuff about me no longer being the front-line
person responsible for Bugzilla and Bonsai turned out to be short-lived.
Please pardon our confusion, and I'm very sorry about the spam.

Updated

19 years ago
Status: NEW → ASSIGNED
Priority: P5 → P2

Comment 3

19 years ago
Actually, I'd like to completely re-write all the quip stuff.

Comment 4

19 years ago
tara@tequilarista.org is the new owner of Bugzilla and Bonsai.  (For details,
see my posting in netscape.public.mozilla.webtools,
news://news.mozilla.org/38F5D90D.F40E8C1A%40geocast.com .)
Assignee: terry → tara
Status: ASSIGNED → NEW
(Assignee)

Comment 5

19 years ago
okay, yeah, that's sorta annoying.
Status: NEW → ASSIGNED
(Assignee)

Comment 6

19 years ago
Happy fun patch...
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
per Terry, auto-verifying any resolved bug that hasn't been touched since before 
2.10 was released.
Status: RESOLVED → VERIFIED
Moving to Bugzilla product
Component: Bugzilla → Bugzilla-General
Product: Webtools → Bugzilla
QA Contact: matty
Target Milestone: --- → Bugzilla old
Version: other → unspecified
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.