Closed Bug 148712 Opened 22 years ago Closed 22 years ago

Add component with empty/invalid initial owner results in double header output

Categories

(Bugzilla :: Administration, task)

2.16
x86
Linux
task
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.16

People

(Reporter: stu, Assigned: stu)

Details

(Keywords: regression)

Attachments

(1 file)

Adding a new component, and filling in the component name and description with
either an empty or invalid initial owner results in the header HTML (including
the initial "Content-type:text/html") being shown twice. (eg. the "error
handling" thinks it's got the whole page to display).

The call to DBNameToIdAndCheck (line 401) in editcomponents.cgi seems to be
extraneous - the check for an empty owner never gets called, and the safer check
for invalid account that doesn't mess up the output doesn't get called.

Deleting that line seems a safe and sensible thing to do.
Comment on attachment 86006 [details] [diff] [review]
(v2.16rc1) Remove extraneous check

>     my $initialowner = trim($::FORM{initialowner} || '');
>-        #
>-        # Now validating to make sure it's too an existing account
>-        #
>-        DBNameToIdAndCheck($initialowner);

This is right, but the error msg is less prominent after the fix. Well, 
this will be rewritten soon anyway, so I don't particularly care 
about the ugliness (not like it were anything beautiful now, though).

The reason behind this odd double logic is a cascade of several events. 
If someone wants to investigate further, see CVS revisions 1.14, 1.16
and 1.19 on the cgi. Relevant are also bug 24806 and bug 66876.

r=jouni
Attachment #86006 - Flags: review+
-> patch author
Assignee: justdave → stu
Keywords: patch, regression, review
Target Milestone: --- → Bugzilla 2.16
Attachment #86006 - Flags: review+
Comment on attachment 86006 [details] [diff] [review]
(v2.16rc1) Remove extraneous check

r=bbaetz
Checked in, trunk + branch.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: