Project

General

Profile

Bug #21017

Internal Server error when searching product repository by numbers with more than 9 digits

Added by Jonathon Turel almost 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Repositories
Target version:
Difficulty:
trivial
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Associated revisions

Revision ddd80cd4 (diff)
Added by Jonathon Turel almost 5 years ago

Fixes #21017 - prevent ISE in repositories search

Revision f7906cef (diff)
Added by Jonathon Turel almost 5 years ago

Refs #21017 - improve scoped_search error handling + tests

Revision 26243182 (diff)
Added by Jonathon Turel almost 5 years ago

Refs #21017 - tweak error message handling in scoped_search

Revision da7a4849 (diff)
Added by Jonathon Turel almost 5 years ago

Refs #21017 - Treat scoped_search errors differently

History

#1 Updated by Jonathon Turel almost 5 years ago

Searching the repositories page for something like '9876543210' raises an error because of the query generated by the scoped_search gem which has this clause:

                         OR              "katello_repositories"."id" IN
                                                (
                                                       SELECT "repository_id" 
                                                       FROM   "katello_content_view_repositories" 
                                                       WHERE  "katello_content_view_repositories"."content_view_id" = '9876543210' )

The search input is out of bounds for postgres integers.

#2 Updated by Jonathon Turel almost 5 years ago

  • Bugzilla link set to 1467722

#4 Updated by The Foreman Bot almost 5 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6959 added

#5 Updated by Anonymous almost 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF