Bug 238780: editversions.cgi should reject newline characters - Patch by Paul <pdemarco@zoominternet.net> r=LpSolit a=justdave

git-svn-id: svn://10.0.0.236/trunk@186732 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
lpsolit%gmail.com
2005-12-29 22:56:01 +00:00
parent a4854b61aa
commit ffe784ec2f
2 changed files with 18 additions and 1 deletions

View File

@@ -130,6 +130,9 @@ if ($action eq 'new') {
# Cleanups and valididy checks
$version_name || ThrowUserError('version_blank_name');
# Remove unprintable characters
$version_name = clean_text($version_name);
my $version = new Bugzilla::Version($product->id, $version_name);
if ($version) {
ThrowUserError('version_already_exists',
@@ -242,6 +245,10 @@ if ($action eq 'edit') {
if ($action eq 'update') {
$version_name || ThrowUserError('version_not_specified');
# Remove unprintable characters
$version_name = clean_text($version_name);
my $version_old_name = trim($cgi->param('versionold') || '');
my $version_old =
Bugzilla::Version::check_version($product,