Closed Bug 670128 Opened 14 years ago Closed 14 years ago

Missing explicit exit after calls to $cgi->redirect(), making the rest of the scripts to be executed

Categories

(Bugzilla :: Bugzilla-General, defect)

3.4.11
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.0

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

Attachments

(1 file)

Attached patch patch, v1Splinter Review
I found this while running QA tests: relogin.cgi: Use of uninitialized value $name in hash element at /usr/lib/perl5/vendor_perl/5.12.2/i386-linux-thread-multi/Template/Context.pm line 100. relogin.cgi: Use of uninitialized value $shortname in substitution (s///) at /usr/lib/perl5/vendor_perl/5.12.2/i386-linux-thread-multi/Template/Context.pm line 116. relogin.cgi: Use of uninitialized value $name in concatenation (.) or string at /usr/lib/perl5/vendor_perl/5.12.2/i386-linux-thread-multi/Template/Context.pm line 168. This happens every time you access relogin.cgi with no argument. This is because we call $cgi->redirect(), but then forget to call |exit| to interrupt the script, and the rest of the script is executed with unexpected data. I found that post_bug.cgi is also affected by a similar problem, where we redirect to enter_bug.cgi if no argument is passed to the script, but the code in post_bug.cgi is executed anyway because there is no explicit |exit| after the redirect. This affects Bugzilla 3.4 and above.
Attachment #544793 - Flags: review?(dkl)
Blocks: 561170
Comment on attachment 544793 [details] [diff] [review] patch, v1 Review of attachment 544793 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. r=dkl
Attachment #544793 - Flags: review?(dkl) → review+
Flags: approval?
Flags: approval4.0?
Flags: approval3.6?
Flags: approval3.4?
Flags: approval?
Flags: approval4.0?
Flags: approval4.0+
Flags: approval3.6?
Flags: approval3.4?
Flags: approval+
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/ modified post_bug.cgi modified relogin.cgi Committed revision 7855. Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.0/ modified post_bug.cgi modified relogin.cgi Committed revision 7615.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: