Bug 1385882

Summary: Host search page throws SQL error from simple searches
Product: Red Hat Satellite Reporter: Calvin Hartwell <chartwel>
Component: HostsAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.1CC: bbuckingham, egolov, inecas, jcallaha, tbrisker
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-06 13:35:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Calvin Hartwell 2016-10-17 20:47:30 UTC
Description of problem:

The search field on the host page throws a SQL exception when typing in a simple string. If a correct string is entered, I.E name = somehostname the field works, but otherwise it doesn't. 

For example: https://sat6fqdn/hosts?utf8=%E2%9C%93&search=abc

Throws the exception: 

Oops, we're sorry but something went wrong ERROR: invalid reference to FROM-clause entry for table "smart_proxies" LINE 1: SELECT smart_proxies.id FROM "smart_proxies" "puppet_ca_prox... ^ HINT: Perhaps you meant to reference the table alias "puppet_ca_proxies_hosts".

Version-Release number of selected component (if applicable):

6.2.1

How reproducible:

100% reproducible 

Steps to Reproduce:
1. Go to hosts page
2. Put in search term
3. Throws exception

Actual results:

Search by throws an exception

Expected results:

Search should not throw an exception but should give an empty search result or warning. 

Additional info:

Is this even tested?!

Comment 2 Tomer Brisker 2016-12-06 13:35:07 UTC

*** This bug has been marked as a duplicate of bug 1372757 ***