Closed
Bug 543432
Opened 16 years ago
Closed 12 years ago
[PostgreSQL] Crash when typing a string in combination with a numeric field
Categories
(Bugzilla :: Query/Bug List, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.4
People
(Reporter: LpSolit, Assigned: LpSolit)
References
()
Details
Attachments
(2 files)
|
4.44 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
|
4.34 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
See the URL field:
DBD::Pg::st execute failed: ERROR: invalid input syntax for integer: ""
For some reason, we don't ignore empty strings and non-integers when looking for bug IDs.
All Bugzilla 3.x versions are affected.
| Assignee | ||
Comment 1•16 years ago
|
||
Same is true for "Bug ID" "is equal to" "foo".
| Assignee | ||
Comment 2•16 years ago
|
||
Bugzilla 3.4 is now restricted to security bugs. We will retarget this bug (to 3.6 or later) when it's fixed.
Target Milestone: Bugzilla 3.4 → ---
Updated•15 years ago
|
Blocks: pg-xt-search
| Assignee | ||
Comment 3•12 years ago
|
||
I had to fix Error.pm to correctly close the multipart document if such as document was in progress when the error is thrown.
Assignee: query-and-buglist → LpSolit
Status: NEW → ASSIGNED
Attachment #8337310 -
Flags: review?(dkl)
| Assignee | ||
Updated•12 years ago
|
Target Milestone: --- → Bugzilla 4.4
Comment 4•12 years ago
|
||
Comment on attachment 8337310 [details] [diff] [review]
patch for trunk, v1
Sorry for the delay as I had to configure a PostgreSQL test environment. But unrelated the patch did not apply cleanly for me:
patching file Bugzilla/CGI.pm
Hunk #1 succeeded at 265 (offset -3 lines).
Hunk #2 FAILED at 669.
Hunk #3 FAILED at 692.
2 out of 3 hunks FAILED -- saving rejects to file Bugzilla/CGI.pm.rej
patching file Bugzilla/Error.pm
Hunk #1 succeeded at 92 (offset -2 lines).
patching file Bugzilla/Search.pm
Hunk #1 succeeded at 1951 (offset -36 lines).
patching file buglist.cgi
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
3 out of 3 hunks ignored -- saving rejects to file buglist.cgi.rej
Please submit a new patch and I will get to it promptly.
dkl
Attachment #8337310 -
Flags: review?(dkl) → review-
| Assignee | ||
Comment 5•12 years ago
|
||
Comment on attachment 8337310 [details] [diff] [review]
patch for trunk, v1
The patch applies cleanly to trunk code.
Attachment #8337310 -
Flags: review- → review?(dkl)
Comment 6•12 years ago
|
||
(In reply to Frédéric Buclin from comment #5)
> Comment on attachment 8337310 [details] [diff] [review]
> patch, v1
>
> The patch applies cleanly to trunk code.
Sorry. Was applying against 4.4 which would explain it. Which also means we will need a separate patch for 4.4 and others.
dkl
Comment 7•12 years ago
|
||
Comment on attachment 8337310 [details] [diff] [review]
patch for trunk, v1
Review of attachment 8337310 [details] [diff] [review]:
-----------------------------------------------------------------
After the fix in Bugzilla/Search.pm all works well and looks good so fix on commit. As stated before we will need a different patch for 4.4-. r=dkl
::: Bugzilla/Search.pm
@@ +1988,5 @@
> my $numeric_value = ($value =~ NUMBER_REGEX) ? 1 : 0;
> my $is_numeric = $numeric_operator && $numeric_field && $numeric_value;
> +
> + # These operators are really numeric operators with numeric fields.
> + $numeric_operator = grep { $_ eq $operator } keys SIMPLE_OPERATORS;
$numeric_operator = grep { $_ eq $operator } keys %{ SIMPLE_OPERATORS() };
Attachment #8337310 -
Flags: review?(dkl) → review+
Updated•12 years ago
|
Flags: approval?
Updated•12 years ago
|
Flags: approval? → approval+
| Assignee | ||
Comment 8•12 years ago
|
||
This bug is focused on comment 1 and similar queries involving simple comparison operators. One could still crash PostgreSQL by using anyexact or (not)regexp, but this make the code much more complex and is out of the goal of this bug.
Summary: [PostgreSQL] Crash when typing ",1" in the "Bug numbered" field → [PostgreSQL] Crash when typing a string in combination with a numeric field and a comparison operator
| Assignee | ||
Updated•12 years ago
|
Summary: [PostgreSQL] Crash when typing a string in combination with a numeric field and a comparison operator → [PostgreSQL] Crash when typing a string in combination with a numeric field
| Assignee | ||
Comment 9•12 years ago
|
||
Attachment #8343181 -
Flags: review?(dkl)
| Assignee | ||
Updated•12 years ago
|
Attachment #8337310 -
Attachment description: patch, v1 → patch for trunk, v1
Comment 10•12 years ago
|
||
yanking approval flag for now since we still have patches pending review. rerequest when it's ready.
Flags: approval+
Comment 11•12 years ago
|
||
(I realize the pending patch is for a different branch, but it's easier to get them all at once when committing rather than trying to remember which ones are committed already)
Comment 12•12 years ago
|
||
Comment on attachment 8343181 [details] [diff] [review]
patch for 4.4, v1
Review of attachment 8343181 [details] [diff] [review]:
-----------------------------------------------------------------
r=dkl
Attachment #8343181 -
Flags: review?(dkl) → review+
| Assignee | ||
Updated•12 years ago
|
Flags: approval?
Flags: approval4.4?
Updated•12 years ago
|
Flags: approval?
Flags: approval4.4?
Flags: approval4.4+
Flags: approval+
| Assignee | ||
Comment 13•12 years ago
|
||
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified buglist.cgi
modified Bugzilla/CGI.pm
modified Bugzilla/Error.pm
modified Bugzilla/Search.pm
Committed revision 8847.
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.4/
modified buglist.cgi
modified Bugzilla/CGI.pm
modified Bugzilla/Error.pm
modified Bugzilla/Search.pm
Committed revision 8647.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•