Closed Bug 226249 Opened 22 years ago Closed 22 years ago

buglist.cgi warning (use uninitialized value) line 97 for no ctype defined

Categories

(Bugzilla :: Query/Bug List, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: goobix, Assigned: goobix)

References

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

If we don't have a ctype CGI param defined, then I get in the server error log: [Wed Nov 19 22:27:12 2003] [error] [client 127.0.0.1] stderr from script: [Wed Nov 19 22:27:12 2003] buglist.cgi: Use of uninitialized value in string eq at /var/www/html/bugzilla/buglist.cgi line 97.
Attached patch Patch (obsolete) — Splinter Review
Attachment #135944 - Flags: review?(AyukawaYukiko)
Attachment #135944 - Flags: review?(AyukawaYukiko) → review?(kiko)
CC-ing default component owner and r? requstee.
Status: NEW → ASSIGNED
Comment on attachment 135944 [details] [diff] [review] Patch >Index: buglist.cgi >-if ($::FORM{'ctype'} eq "js") { >- Bugzilla->logout(); >+if (defined $::FORM{'ctype'}) { >+ if ($::FORM{'ctype'} eq "js") { >+ Bugzilla->logout(); There's this great operator -- && -- and it's very useful for cass like this :-)
Attachment #135944 - Flags: review?(kiko) → review-
*** Bug 226251 has been marked as a duplicate of this bug. ***
CCing Gerv because he caused this ;)
Keywords: regression
Attached patch Version2 (obsolete) — Splinter Review
It can exists without being defined but as justdave and kiko enlighted me, it's guaranteed to have a value in case it exists so using "exists" instead of "defined" should work.
Attachment #135944 - Attachment is obsolete: true
Attachment #135949 - Attachment is obsolete: true
Attached patch Ver 3Splinter Review
Attachment #135950 - Flags: review?(kiko)
Attachment #135950 - Flags: review?(kiko) → review+
Flags: approval?
Oops. Sorry :-) But it did fix the security hole. Gerv
Flags: approval? → approval+
Target Milestone: --- → Bugzilla 2.18
Checking in buglist.cgi; /cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v <-- buglist.cgi new revision: 1.239; previous revision: 1.238 done
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
*** Bug 235656 has been marked as a duplicate of this bug. ***
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: