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

RESOLVED FIXED in Bugzilla 2.18

Status

()

Bugzilla
Query/Bug List
RESOLVED FIXED
15 years ago
6 years ago

People

(Reporter: Vlad Dascalu, Assigned: Vlad Dascalu)

Tracking

({regression})

unspecified
Bugzilla 2.18
regression
Bug Flags:
approval +

Details

Attachments

(1 attachment, 2 obsolete attachments)

569 bytes, patch
Christian Reis
: review+
Details | Diff | Splinter Review
(Assignee)

Description

15 years ago
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.
(Assignee)

Comment 1

15 years ago
Created attachment 135944 [details] [diff] [review]
Patch
(Assignee)

Updated

15 years ago
Attachment #135944 - Flags: review?(AyukawaYukiko)
(Assignee)

Updated

15 years ago
Attachment #135944 - Flags: review?(AyukawaYukiko) → review?(kiko)
(Assignee)

Comment 2

15 years ago
CC-ing default component owner and r? requstee.
Status: NEW → ASSIGNED

Comment 3

15 years ago
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
(Assignee)

Comment 6

15 years ago
Created attachment 135949 [details] [diff] [review]
Version2

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
(Assignee)

Updated

15 years ago
Attachment #135949 - Attachment is obsolete: true
(Assignee)

Comment 7

15 years ago
Created attachment 135950 [details] [diff] [review]
Ver 3
(Assignee)

Updated

15 years ago
Attachment #135950 - Flags: review?(kiko)

Updated

15 years ago
Attachment #135950 - Flags: review?(kiko) → review+
(Assignee)

Updated

15 years ago
Flags: approval?
Oops. Sorry :-) But it did fix the security hole.

Gerv
Flags: approval? → approval+
(Assignee)

Updated

15 years ago
Target Milestone: --- → Bugzilla 2.18
(Assignee)

Comment 9

15 years ago
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
Last Resolved: 15 years ago
Resolution: --- → FIXED

Comment 10

14 years ago
*** 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.