Project

General

Profile

Actions

Bug #13624

closed

entering fulltext in filter report field can lead to database crash

Added by Christian Klinger almost 9 years ago. Updated almost 9 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

select report "all hosts". Enter a full text name without "host=" in filter control.
Can lead to postgres database crash!!!

The generated query by foreman

SELECT DISTINCT "reports".id, "reports"."reported_at" AS alias_0 FROM "reports" LEFT OUTER JOIN "hosts" ON "hosts"."id" = "reports"."host_id" AND "hosts"."type" IN ('Host::Managed') LEFT OUTER JOIN "hosts" "hosts_reports_join" ON "hosts_reports_join"."id" = "reports"."host_id" AND "hosts_reports_join"."type" IN ('Host::Managed') LEFT OUTER JOIN "environments" ON "environments"."id" = "hosts_reports_join"."environment_id" LEFT OUTER JOIN "logs" ON "logs"."report_id" = "reports"."id" LEFT OUTER JOIN "messages" ON "messages"."id" = "logs"."message_id" LEFT OUTER JOIN "logs" "logs_reports_join" ON "logs_reports_join"."report_id" = "reports"."id" LEFT OUTER JOIN "sources" ON "sources"."id" = "logs_reports_join"."source_id" LEFT OUTER JOIN "hosts" "hosts_reports_join_2" ON "hosts_reports_join_2"."id" = "reports"."host_id" AND "hosts_reports_join_2"."type" IN ('Host::Managed') LEFT OUTER JOIN "hostgroups" ON "hostgroups"."id" = "hosts_reports_join_2"."hostgroup_id" WHERE (("hosts"."name"
ILIKE '%vmname%' OR "environments"."name" ILIKE '%vmname%' OR "messages"."value" ILIKE '%vmname%' OR "sources"."value" ILIKE '%vmname%' OR "hostgroups"."name" ILIKE '%vmname%' OR "hostgroups"."title" ILIKE '%vmname%' OR "hostgroups"."title" ILIKE '%vmname%')) ORDER BY "reports"."reported_at" DESC LIMIT 150 OFFSET 0


Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #2778: Search in /reports without keyword make request never end on mysqlDuplicate07/12/2013Actions
Actions #1

Updated by Dominic Cleal almost 9 years ago

  • Is duplicate of Bug #2778: Search in /reports without keyword make request never end on mysql added
Actions #2

Updated by Dominic Cleal almost 9 years ago

  • Priority changed from Immediate to Normal

Thanks for the report, this is tracked as issue #2778.

Actions #3

Updated by Dominic Cleal almost 9 years ago

  • Status changed from New to Duplicate
Actions #4

Updated by Christian Klinger almost 9 years ago

When will it be fixed ? It leads to an serious impact.

Actions #5

Updated by Dominic Cleal almost 9 years ago

I don't know, we don't have a plan or schedule for bug fixes. If you'd like to contribute a fix, please see http://theforeman.org/contribute.html.

Actions

Also available in: Atom PDF