From: bbaetz%acm.org <> Date: Sun, 16 Mar 2003 14:16:43 +0000 (+0000) Subject: Bug 197180 - Long comment names not flagged as an error X-Git-Tag: bugzilla-2.17.4~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78db8be8ca8f3de2169981a2ead269fd12395089;p=thirdparty%2Fbugzilla.git Bug 197180 - Long comment names not flagged as an error r,a=justdave --- diff --git a/editcomponents.cgi b/editcomponents.cgi index fc45b52c8b..4ee147453f 100755 --- a/editcomponents.cgi +++ b/editcomponents.cgi @@ -123,7 +123,7 @@ sub EmitFormElements ($$$$$) $initialqacontactid ? DBID_to_name ($initialqacontactid) : ''); print " Component:\n"; - print " \n"; print " \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'