aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbbaetz%acm.org <>2003-03-16 14:16:43 +0000
committerbbaetz%acm.org <>2003-03-16 14:16:43 +0000
commit78db8be8ca8f3de2169981a2ead269fd12395089 (patch)
treec314e5f7d87264f6bea76d760ac58552798721ea /editcomponents.cgi
parentBug 193989: EmailSuffix wasn't getting used for password change tokens. Also... (diff)
downloadbugzilla-78db8be8ca8f3de2169981a2ead269fd12395089.tar.gz
bugzilla-78db8be8ca8f3de2169981a2ead269fd12395089.tar.bz2
bugzilla-78db8be8ca8f3de2169981a2ead269fd12395089.zip
Bug 197180 - Long comment names not flagged as an error
r,a=justdave
Diffstat (limited to 'editcomponents.cgi')
-rwxr-xr-xeditcomponents.cgi14
1 files changed, 13 insertions, 1 deletions
diff --git a/editcomponents.cgi b/editcomponents.cgi
index fc45b52c8..4ee147453 100755
--- a/editcomponents.cgi
+++ b/editcomponents.cgi
@@ -123,7 +123,7 @@ sub EmitFormElements ($$$$$)
$initialqacontactid ? DBID_to_name ($initialqacontactid) : '');
print " <TH ALIGN=\"right\">Component:</TH>\n";
- print " <TD><INPUT SIZE=64 MAXLENGTH=255 NAME=\"component\" VALUE=\"" .
+ print " <TD><INPUT SIZE=64 MAXLENGTH=64 NAME=\"component\" VALUE=\"" .
value_quote($component) . "\">\n";
print " <INPUT TYPE=HIDDEN NAME=\"product\" VALUE=\"" .
value_quote($product) . "\"></TD>\n";
@@ -386,6 +386,12 @@ if ($action eq 'new') {
exit;
}
+ if (length($component) > 64) {
+ print "Sorry, the name of a component is limited to 64 characters.";
+ PutTrailer($localtrailer);
+ exit;
+ }
+
my $description = trim($::FORM{description} || '');
if ($description eq '') {
@@ -710,6 +716,12 @@ if ($action eq 'update') {
my $initialqacontact = trim($::FORM{initialqacontact} || '');
my $initialqacontactold = trim($::FORM{initialqacontactold} || '');
+ if (length($component) > 64) {
+ print "Sorry, the name of a component is limited to 64 characters.";
+ PutTrailer($localtrailer);
+ exit;
+ }
+
# Note that the order of this tests is important. If you change
# them, be sure to test for WHERE='$component' or WHERE='$componentold'