Bug #16219
closedAssociation named 'hostgroup' was not found on Nic::Base
Description
Hi,
We're running Foreman 1.11.4 on CentOS7 as installed directly from the RPM available via yum.theforeman.org and we're running into a very odd issue when querying the list of interfaces of a host via the API:
A GET request on api/hosts/nacho1.cern.ch/interfaces leads to a server crash:
< HTTP/1.1 500 Internal Server Error "error": {"message":"Association named 'hostgroup' was not found on Nic::Base; perhaps you misspelled it?"}
This is even happening with a pristine database (one non-admin user, one hostgroup, one host and one role assigned to the user allowing viewing hosts in the mentioned hostgroup). Other models queried via hosts/ like parameters/ are not affected.
Find attached the full stacktrace (production.log) and the full list of Gems installed (gemlist.txt). Please let us know if a dump of the test database would be useful.
We initially hit the bug when we backported 7a86dcfe6b36dd43cd6163ce70599e53f09cc217 (fix for CVE-2016-5390) to 1.11.2.
Thanks for looking into it and any question please don't hesitate to ask :)
Files
Updated by Dominic Cleal over 8 years ago
- Related to Bug #15653: CVE-2016-5390 - access to API host interfaces, parameters etc. are not restricted by view_hosts filters added
Updated by The Foreman Bot over 8 years ago
- Status changed from New to Ready For Testing
- Assignee set to Daniel Lobato Garcia
- Pull request https://github.com/theforeman/foreman/pull/3807 added
Updated by Daniel Lobato Garcia over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100