Actions
Bug #30079
closedSearching for just "composite" in content views page causes ISE
Status:
Closed
Priority:
Normal
Assignee:
Category:
Content Views
Target version:
Description
To reproduce:
- Navigate to /content_views
- search for just "composite"
- Check server logs
This isn't a huge deal now but will be if/when we add automatic searching on keystroke.
Updated by John Mitsch about 4 years ago
- Related to Tracker #29297: Content Publication Workflow added
Updated by Chris Roberts about 4 years ago
- Target version changed from Katello 4.0.0 to Katello 3.17.0
Updated by James Jeffers about 4 years ago
Example production log:
16:25:04 rails.1 | 2020-08-07T16:25:04 [I|app|27d751bf] Started GET "/katello/api/v2/content_views?nondefault=true&organization_id=1&page=1&paged=true&per_page=20&search=+composite+&sort_by=name&sort_order=ASC" for 127.0.0.1 at 2020-08-07 16:25:04 +0000 16:25:05 rails.1 | 2020-08-07T16:25:05 [I|app|27d751bf] Processing by Katello::Api::V2::ContentViewsController#index as HTML 16:25:05 rails.1 | 2020-08-07T16:25:05 [I|app|27d751bf] Parameters: {"nondefault"=>"true", "organization_id"=>"1", "page"=>"1", "paged"=>"true", "per_page"=>"20", "search"=>" composite ", "sort_by"=>"name", "sort_order"=>"ASC", "api_version"=>"v2"} 16:25:05 rails.1 | 2020-08-07T16:25:05 [E|app|27d751bf] ActiveRecord::PreparedStatementInvalid: wrong number of bind variables (0 for 1) in: (["(\"katello_content_views\".\"composite\" <> ?)", false]) 16:25:05 rails.1 | 27d751bf | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-6.0.3.2/lib/active_record/sanitization.rb:209:in `raise_if_bind_arity_mismatch' 16:25:05 rails.1 | 27d751bf | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-6.0.3.2/lib/active_record/sanitization.rb:166:in `replace_bind_variables' 16:25:05 rails.1 | 27d751bf | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-6.0.3.2/lib/active_record/sanitization.rb:129:in `sanitize_sql_array' 16:25:05 rails.1 | 27d751bf | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-6.0.3.2/lib/active_record/sanitization.rb:26:in `sanitize_sql_for_conditions' 16:25:05 rails.1 | 27d751bf | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-6.0.3.2/lib/active_record/relation/where_clause_factory.rb:14:in `build' 16:25:05 rails.1 | 27d751bf | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:656:in `where!' 16:25:05 rails.1 | 27d751bf | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:649:in `where' 16:25:05 rails.1 | 27d751bf | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/scoped_search-4.1.8/lib/scoped_search/definition.rb:329:in `block in register_named_scope!' 16:25:05 rails.1 | 27d751bf | /home/vagrant/projects/katello/app/controllers/katello/api/v2/api_controller.rb:81:in `scoped_search' 16:25:05 rails.1 | 27d751bf | /home/vagrant/projects/katello/app/controllers/katello/api/v2/content_views_controller.rb:46:in `index'
Updated by James Jeffers about 4 years ago
This appears to also affect searches for similar Boolean fields in the foreman project.
For example, /users?search=disabled&page=1 will also trigger an ISE.
This appears to be a defect in the scoped_search gem.
Updated by James Jeffers almost 4 years ago
Scoped search issue at https://github.com/wvanbergen/scoped_search/issues/200
Updated by The Foreman Bot almost 4 years ago
- Status changed from New to Ready For Testing
- Assignee set to James Jeffers
- Pull request https://github.com/Katello/katello/pull/8913 added
Updated by The Foreman Bot almost 4 years ago
- Fixed in Releases Katello 4.0.0 added
Updated by James Jeffers almost 4 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|8a1c4fa46d9fb4b0ee941b08f0278a84600e87d6.
Actions