Closed
Bug 600616
Opened 14 years ago
Closed 14 years ago
show_bug.cgi: Invalid parameter passed to Bugzilla::Search::Recent::_init
Categories
(Bugzilla :: Creating/Changing Bugs, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.0
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
624 bytes,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
I was pretty sure this was already filed, but I cannot find it. I get this error too frequently to my taste: Invalid parameter passed to Bugzilla::Search::Recent::_init: It must be numeric. Traceback: at Bugzilla/Object.pm line 86 Bugzilla::Object::_init(...) called at Bugzilla/Object.pm line 58 Bugzilla::Object::new(...) called at Bugzilla/Object.pm line 145 Bugzilla::Object::check(...) called at Bugzilla/Search/Recent.pm line 85 Bugzilla::Search::Recent::check(...) called at Bugzilla/User.pm line 424 eval {...} called at Bugzilla/User.pm line 424 Bugzilla::User::recent_search_for(...) called at template/en/default/bug/navigate.html.tmpl line 42 eval {...} called at template/en/default/bug/navigate.html.tmpl line 42 eval {...} called at template/en/default/bug/navigate.html.tmpl line 18 Template::Provider::__ANON__(...) called at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Template/Document.pm line 151 eval {...} called at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Template/Document.pm line 149 Template::Document::process(...) called at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Template/Context.pm line 351 eval {...} called at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Template/Context.pm line 321 Template::Context::process(...) called at Bugzilla/Template/Context.pm line 45 Bugzilla::Template::Context::process(...) called at template/en/default/bug/show.html.tmpl line 43 eval {...} called at template/en/default/bug/show.html.tmpl line 18 Template::Provider::__ANON__(...) called at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Template/Document.pm line 151 eval {...} called at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Template/Document.pm line 149 Template::Document::process(...) called at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Template/Context.pm line 351 eval {...} called at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Template/Context.pm line 321 Template::Context::process(...) called at Bugzilla/Template/Context.pm line 45 Bugzilla::Template::Context::process(...) called at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Template/Service.pm line 94 eval {...} called at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Template/Service.pm line 91 Template::Service::process(...) called at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Template.pm line 66 Template::process(...) called at Bugzilla/Template.pm line 595 Bugzilla::Template::process(...) called at /var/www/html/bugzilla/show_bug.cgi line 128
Flags: blocking4.0+
Assignee | ||
Comment 1•14 years ago
|
||
Oh, the URL has: list_id=cookie
Comment 2•14 years ago
|
||
Oh yeah, maybe this was the error that I was thinking of, that I was hitting frequently.
Assignee | ||
Updated•14 years ago
|
Depends on: 24896
Keywords: regression
Assignee | ||
Comment 3•14 years ago
|
||
Make sure the list_id is a valid integer. Else look at the BUGLIST cookie.
Assignee: create-and-change → LpSolit
Status: NEW → ASSIGNED
Attachment #482060 -
Flags: review?(mkanat)
Comment 4•14 years ago
|
||
Comment on attachment 482060 [details] [diff] [review] patch, v1 Hmm. Instead of this, I think that we should just explicitly check that it ne 'cookie'.
Attachment #482060 -
Flags: review?(mkanat) → review-
Assignee | ||
Comment 5•14 years ago
|
||
(In reply to comment #4) > Hmm. Instead of this, I think that we should just explicitly check that it ne > 'cookie'. Why? If you don't pass an integer, it fails exactly as described in comment 0. That's the point of this fix.
Comment 6•14 years ago
|
||
(In reply to comment #5) > Why? If you don't pass an integer, it fails exactly as described in comment 0. > That's the point of this fix. Ah, yeah, but the only string that *should* be passing through there is "cookie". So if there's some other string passing through, that's actually a problem, and we *should* fail.
Assignee | ||
Comment 7•14 years ago
|
||
I disagree. I just have to play with the URL and pass list_id=foo to make Bugzilla crash. That's bad design.
Comment 8•14 years ago
|
||
Well, I understand where you're coming from, but computer programs are supposed to fail when given invalid input, rather than behave unexpectedly. You could possibly throw an error if there's a string and it's not "cookie", though.
Assignee | ||
Comment 9•14 years ago
|
||
Attachment #482060 -
Attachment is obsolete: true
Attachment #483013 -
Flags: review?(mkanat)
Comment 10•14 years ago
|
||
Comment on attachment 483013 [details] [diff] [review] patch, v2 Sweet, thanks. :-)
Attachment #483013 -
Flags: review?(mkanat) → review+
Updated•14 years ago
|
Flags: approval4.0+
Flags: approval+
Assignee | ||
Comment 11•14 years ago
|
||
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/ modified Bugzilla/User.pm Committed revision 7537. Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.0/ modified Bugzilla/User.pm Committed revision 7438.
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.
Description
•