Closed
Bug 217627
Opened 22 years ago
Closed 21 years ago
bugzilla gets internal error if bug id starts with zero
Categories
(Bugzilla :: Creating/Changing Bugs, defect)
Bugzilla
Creating/Changing Bugs
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: legion, Assigned: legion)
References
Details
Attachments
(1 file, 1 obsolete file)
|
532 bytes,
patch
|
justdave
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.3a) Gecko/20021215 Phoenix/0.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.3a) Gecko/20021215 Phoenix/0.5
bugzilla 2.17.4 get error when get URL:
http:// ... /show_bug.cgi?id=01
the database contians bug with id #1, but in Bug.pm at line 114 this bug is to
be converted into alias. I know alias of bug may be any string, but maybe best
solution is return to search bug if id is not alias and starts from zero.
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
| Assignee | ||
Comment 1•22 years ago
|
||
Comment 2•22 years ago
|
||
Comment on attachment 130547 [details] [diff] [review]
Bug.patch
I think the proper solution here is to make the bug alias lookup regexp given a
couple lines earlier allow zero in the first digit. (i.e. remove the [1-9] from
the front of the regexp and change the * to a + on the end.
Attachment #130547 -
Flags: review-
Comment 3•22 years ago
|
||
Also, indentation seems broken on that patch. Alexey, did you mix tabs and
spaces? The policy for Bugzilla (and all Mozilla projects) is "no tabs".
Comment 4•22 years ago
|
||
forgot to mention, the fix you gave would cause problems if you passed a
bug_id=0abc or example, because the leading 0 would throw it off and make it
think it was a number with your test.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: bugzilla get internal error if bug id starts from zero → bugzilla gets internal error if bug id starts with zero
| Assignee | ||
Comment 5•22 years ago
|
||
Ups! Sorry ! i will be more careful when i will make attachents again. Yes, this
patch is not fix this problem. You right, best solution is remove the [1-9] from
regexp.
Comment 6•22 years ago
|
||
*** Bug 235079 has been marked as a duplicate of this bug. ***
Comment 7•21 years ago
|
||
Alexey: were you going to update your patch, or would you like someone else to
go ahead and take care of it?
| Assignee | ||
Comment 8•21 years ago
|
||
Attachment #130547 -
Attachment is obsolete: true
| Assignee | ||
Comment 9•21 years ago
|
||
I think the solution may be more simple. We must consider leading '0' at the bug
alias lookup and bug id must contain at least one non-'0' number.
Comment 10•21 years ago
|
||
Comment on attachment 148820 [details] [diff] [review]
new solution
>+ $bug_id = &::BugAliasToID($bug_id) if $bug_id !~ /^0*[1-9][0-9]*$/;
I was originally thinking this was overkill when I first saw it, but then I
realized you've hit it straight on. :) "0" isn't a legal bug number, and your
new regexp allows leading zeros, but still ensures that the entire number isn't
"0" itself :) I think that'll work nicely.
Attachment #148820 -
Flags: review+
Comment 11•21 years ago
|
||
-> patch author
a= justdave
You need someone to check this in for you, right?
Assignee: myk → legion
Flags: approval+
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → Bugzilla 2.18
| Assignee | ||
Comment 12•21 years ago
|
||
Yes. So bug is closed?
Comment 13•21 years ago
|
||
FIXED.
Checking in Bugzilla/Bug.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v <-- Bug.pm
new revision: 1.35; previous revision: 1.34
done
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 14•21 years ago
|
||
(In reply to comment #12)
> Yes. So bug is closed?
Nope. A bug gets RESOLVED FIXED when the actual patch is commited in the
mozilla.org CVS. It's usually marked as FIXED by the CVS commiter.
Updated•13 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•