diff --git a/webtools/bugzilla/editcomponents.cgi b/webtools/bugzilla/editcomponents.cgi index fc45b52c8ba2..4ee147453fd4 100755 --- a/webtools/bugzilla/editcomponents.cgi +++ b/webtools/bugzilla/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'