Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionBrad Buckingham
2011-10-12 14:32:36 UTC
Description of problem:
Performing search queries that contain single quotes ('), generates invalid SQL. This appears to be an issue in the scoped_search gem.
This was observed using the scoped_search auto-complete feature. The auto-complete suggested the following as a search query; however, submitting that query generates an exception:
description = "Association named 'user' was not found; perhaps you misspelled it?"
Note: auto-complete should only suggest queries that are 'valid'.
Version-Release number of selected component (if applicable):
master
How reproducible:
always
Steps to Reproduce:
1. perform a search query that contains single quotes. E.g. description = "this is an 'invalid' query"
2.
3.
Actual results:
Exception. Using the example from the description generates an error like:
SQLite3::SQLException: near "user": syntax error: SELECT DISTINCT "notices".text FROM "notices" INNER JOIN "user_notices" ON "notices"."id" = "user_notices"."notice_id" INNER JOIN "users" ON "users"."id" = "user_notices"."user_id" WHERE "users"."id" = 3 AND (text LIKE 'Association named 'user' was not found; perhaps you misspelled it?%') LIMIT 20
Expected results:
Valid search results returned.
Additional info:
verified that the issue raised description above is no longer observable with scoped_search 2.3.6... that version of scoped_search gem has been pushed in to the git repos and should be available in an upcoming build.
Description of problem: Performing search queries that contain single quotes ('), generates invalid SQL. This appears to be an issue in the scoped_search gem. This was observed using the scoped_search auto-complete feature. The auto-complete suggested the following as a search query; however, submitting that query generates an exception: description = "Association named 'user' was not found; perhaps you misspelled it?" Note: auto-complete should only suggest queries that are 'valid'. Version-Release number of selected component (if applicable): master How reproducible: always Steps to Reproduce: 1. perform a search query that contains single quotes. E.g. description = "this is an 'invalid' query" 2. 3. Actual results: Exception. Using the example from the description generates an error like: SQLite3::SQLException: near "user": syntax error: SELECT DISTINCT "notices".text FROM "notices" INNER JOIN "user_notices" ON "notices"."id" = "user_notices"."notice_id" INNER JOIN "users" ON "users"."id" = "user_notices"."user_id" WHERE "users"."id" = 3 AND (text LIKE 'Association named 'user' was not found; perhaps you misspelled it?%') LIMIT 20 Expected results: Valid search results returned. Additional info: