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.
Bug 1248271 - Task search not properly validating input, throws SQL error
Summary: Task search not properly validating input, throws SQL error
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Tasks Plugin
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Shimon Shtein
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-30 01:34 UTC by Corey Welton
Modified: 2019-09-26 13:54 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 21:12:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15922 0 None None None 2016-08-01 06:50:54 UTC

Description Corey Welton 2015-07-30 01:34:14 UTC
Description of problem:

Depending on expected inputs, user can get a SQL error thrown on Tasks when providing wrong input type.

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


How reproducible:


Steps to Reproduce:
1.  Create admin user named 'mmccune'
2.  Using 'mmccune', perform a variety of tasks.
3.  Monitor > Tasks
4.  in search filter, search for owner.id = mmccune (note that this is incorrect; id is expecting an integer)

View results

Actual results:


PGError: ERROR: invalid input syntax for integer: "mmccune" LINE 4: ...) WHERE ((foreman_tasks_locks_owner.resource_id = 'mmccune')... ^ : SELECT "foreman_tasks_tasks".* FROM "foreman_tasks_tasks" INNER JOIN foreman_tasks_locks AS foreman_tasks_locks_owner ON (foreman_tasks_locks_owner.task_id = foreman_tasks_tasks.id AND foreman_tasks_locks_owner.resource_type = 'User' AND foreman_tasks_locks_owner.name = 'task_owner') WHERE ((foreman_tasks_locks_owner.resource_id = 'mmccune')) ORDER BY "foreman_tasks_tasks"."started_at" DESC NULLS LAST LIMIT 20 OFFSET 0

Expected results:


Proper handling of incorrect inputs.

Additional info:

Comment 2 Ivan Necas 2016-08-01 06:50:53 UTC
Created redmine issue http://projects.theforeman.org/issues/15922 from this bug

Comment 4 Bryan Kearney 2016-08-04 20:18:14 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 5 Bryan Kearney 2016-08-29 14:08:54 UTC
Upstream bug assigned to sshtein

Comment 6 Bryan Kearney 2016-08-29 14:08:58 UTC
Upstream bug assigned to sshtein

Comment 7 Bryan Kearney 2017-03-21 21:12:35 UTC
There is a an upstream issue opened for this. We will no longer be tracking this downstream. If you believe this was closed in error please feel free to re-open with additional information.


Note You need to log in before you can comment on or make changes to this bug.