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.
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-
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".
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
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.
*** Bug 235079 has been marked as a duplicate of this bug. ***
Alexey: were you going to update your patch, or would you like someone else to go ahead and take care of it?
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 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+
-> patch author a= justdave You need someone to check this in for you, right?
Assignee: myk → legion
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → Bugzilla 2.18
Yes. So bug is closed?
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: 15 years ago
Resolution: --- → FIXED
(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.
You need to log in before you can comment on or make changes to this bug.