Closed
Bug 340609
Opened 18 years ago
Closed 16 years ago
Bug->check() / ValidateBugId() should throw an error if no bug ID is passed
Categories
(Bugzilla :: Attachments & Requests, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.0
People
(Reporter: timeless, Assigned: LpSolit)
References
()
Details
Attachments
(3 files)
663 bytes,
patch
|
bugzilla-mozilla
:
review+
|
Details | Diff | Splinter Review |
629 bytes,
patch
|
bugzilla-mozilla
:
review+
|
Details | Diff | Splinter Review |
621 bytes,
patch
|
Details | Diff | Splinter Review |
Software error: Undef to trick_taint at Bugzilla/Util.pm line 63 Bugzilla::Util::trick_taint('undef') called at Bugzilla/Bug.pm line 708 Bugzilla::Bug::bug_alias_to_id('undef') called at CGI.pl line 156 main::ValidateBugID('undef') called at /opt/webtools/bugzilla/attachment.cgi line 829 main::enter() called at /opt/webtools/bugzilla/attachment.cgi line 89 For help, please send mail to the webmaster (sysadmins@mozilla.org), giving this error message and the time and date of the error.
Comment 1•18 years ago
|
||
You specified in your report https://bugzilla.mozilla.org/attachment.cgi?bug_id=spelling&action=enter as URL, but actually it's "bugid" and not "bug_id". The following URL reproduces the error: https://bugzilla.mozilla.org/attachment.cgi?action=enter
Updated•18 years ago
|
OS: Windows XP → All
Hardware: PC → All
Comment 2•18 years ago
|
||
This is also happening on viewall: https://bugzilla.mozilla.org/attachment.cgi?action=viewall (and possibly others as well)
Comment 3•18 years ago
|
||
I have a similar problem: Undef to trick_taint at Bugzilla/Util.pm line 66 Bugzilla::Util::trick_taint('undef') called at .../editcomponents.cgi line 197 My Bugzilla version is 2.22.
I have similar (if not the same) problem: Software error: Undef to trick_taint at Bugzilla/Util.pm line 67 Bugzilla::Util::trick_taint('undef') called at Bugzilla/Auth/Persist/Cookie.pm line 61 Bugzilla::Auth::Persist::Cookie::persist_login('Bugzilla::Auth::Persist::Cookie=ARRAY(0x2d5327c)', 'Bugzilla::User=HASH(0x2f09ea8)') called at Bugzilla/Auth.pm line 147 Bugzilla::Auth::_handle_login_result('Bugzilla::Auth=ARRAY(0x2378910)', 'HASH(0x2d53bdc)', 2) called at Bugzilla/Auth.pm line 92 Bugzilla::Auth::login('Bugzilla::Auth=ARRAY(0x2378910)', 2) called at Bugzilla.pm line 232 Bugzilla::login('Bugzilla', 0) called at C:\Bugz\index.cgi line 40 For help, please send mail to this site's webmaster, giving this error message and the time and date of the error. [Thu Mar 27 11:46:53 2008] index.cgi: Undef to trick_taint at Bugzilla/Util.pm line 67 [Thu Mar 27 11:46:53 2008] index.cgi: Bugzilla::Util::trick_taint('undef') called at Bugzilla/Auth/Persist/Cookie.pm line 61 [Thu Mar 27 11:46:53 2008] index.cgi: Bugzilla::Auth::Persist::Cookie::persist_login('Bugzilla::Auth::Persist::Cookie=ARRAY(0x2d5327c)', 'Bugzilla::User=HASH(0x2f09ea8)') called at Bugzilla/Auth.pm line 147 [Thu Mar 27 11:46:53 2008] index.cgi: Bugzilla::Auth::_handle_login_result('Bugzilla::Auth=ARRAY(0x2378910)', 'HASH(0x2d53bdc)', 2) called at Bugzilla/Auth.pm line 92 [Thu Mar 27 11:46:53 2008] index.cgi: Bugzilla::Auth::login('Bugzilla::Auth=ARRAY(0x2378910)', 2) called at Bugzilla.pm line 232 [Thu Mar 27 11:46:53 2008] index.cgi: Bugzilla::login('Bugzilla', 0) called at C:\Bugz\index.cgi line 40 * This is Bugzilla 3.0.3 on perl 5.8.8 * Running on WinVista Build 6000 The problem occurs straight after login.
Comment 5•16 years ago
|
||
we've gotten a number of reports of the second error given in comment 4 from people trying to log into bmo recently.
Severity: normal → major
Comment 6•16 years ago
|
||
(In reply to comment #5) > we've gotten a number of reports of the second error given in comment 4 from > people trying to log into bmo recently. That would be a different bug.
Summary: Undef to trick_taint at Bugzilla/Util.pm line 63 → Undef to trick_taint at Bugzilla/Util.pm line 63 from attachment.cgi
Comment 7•16 years ago
|
||
OK, mkanat is correct, the specific error message from Bugzilla/Util.pm is on purpose, telling us that someone's calling it wrong. So each of the places this is being found, the bug needs to be filed based on the caller in the stack. Comments 0 through 2 (timeless) are all the same caller (or closely-enough related to live on the same bug). Comment 3 (Ryszard) should be a separate bug referencing editcomponents.cgi line 197 (now lives at bug 453497). Comments 4 and 5 (Réna and justdave) should be yet another, referencing Bugzilla/Auth/Persist/Cookie.pm line 61 (now lives at bug 453499)
Summary: Undef to trick_taint at Bugzilla/Util.pm line 63 from attachment.cgi → Undef to trick_taint at Bugzilla/Util.pm line 63 from ValidateBugId() at attachment.cgi line 829
Assignee | ||
Comment 8•16 years ago
|
||
We should immediately throw an error when no bug ID is passed to Bug->check() / ValidateBugID().
Assignee: attach-and-request → LpSolit
Status: NEW → ASSIGNED
Attachment #339693 -
Flags: review?(bugzilla-mozilla)
Assignee | ||
Comment 9•16 years ago
|
||
Same patch as for tip. Immediately throw an error if the bug ID is undefined.
Attachment #339694 -
Flags: review?(bugzilla-mozilla)
Assignee | ||
Updated•16 years ago
|
Summary: Undef to trick_taint at Bugzilla/Util.pm line 63 from ValidateBugId() at attachment.cgi line 829 → Bug->check() / ValidateBugId() should throw an error if no bug ID is passed
Updated•16 years ago
|
Attachment #339693 -
Flags: review?(bugzilla-mozilla) → review+
Comment 10•16 years ago
|
||
Comment on attachment 339693 [details] [diff] [review] patch for tip, v1 r=bkor by inspection
Updated•16 years ago
|
Attachment #339694 -
Flags: review?(bugzilla-mozilla) → review+
Comment 11•16 years ago
|
||
Comment on attachment 339694 [details] [diff] [review] patch for 3.2, v1 r=bkor by inspection
Assignee | ||
Updated•16 years ago
|
Flags: approval3.2+
Flags: approval3.0+
Flags: approval+
Assignee | ||
Comment 12•16 years ago
|
||
For the record, note that the crash only occured if aliases were in use, due to bug_alias_to_id(). tip: Checking in Bugzilla/Bug.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v <-- Bug.pm new revision: 1.261; previous revision: 1.260 done 3.2rc1: Checking in Bugzilla/Bug.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v <-- Bug.pm new revision: 1.241.2.13; previous revision: 1.241.2.12 done 3.0.5: Checking in Bugzilla/Bug.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v <-- Bug.pm new revision: 1.171.2.7; previous revision: 1.171.2.6 done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 13•16 years ago
|
||
Here is the patch I used for 3.0.5. 'improper_bug_id_field_value' doesn't exist on this branch (despite what bug 221827 said), so I used 'invalid_bug_id_or_alias', which is its old name.
Comment 14•16 years ago
|
||
Comment on attachment 339693 [details] [diff] [review] patch for tip, v1 I thought that $self->new was supposed to handle that case and return undef for $self...
Assignee | ||
Comment 15•16 years ago
|
||
(In reply to comment #14) > I thought that $self->new was supposed to handle that case and return undef for > $self... When aliases are in use, the crash happens well before new() is called. And even when aliases are not in use, it fills the web server error log due to regexps made against undef.
Comment 16•16 years ago
|
||
(In reply to comment #15) > When aliases are in use, the crash happens well before new() is called. new() is called right below the line that was added... > And > even when aliases are not in use, it fills the web server error log due to > regexps made against undef. Okay. Well, Bugzilla::Bug->new() should be fixed, it's violating the contract of Bugzilla::Object->new().
You need to log in
before you can comment on or make changes to this bug.
Description
•