Bug 1595158 - API with an invalid zone name kill the appliance
Summary: API with an invalid zone name kill the appliance
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.10.0
Assignee: Julian Cheal
QA Contact: Jaroslav Henner
URL:
Whiteboard:
Depends On:
Blocks: 1578510 1599349 1648808
TreeView+ depends on / blocked
 
Reported: 2018-06-26 09:14 UTC by Gellert Kis
Modified: 2022-03-13 15:09 UTC (History)
11 users (show)

Fixed In Version: 5.10.0.12
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1599349 (view as bug list)
Environment:
5.9
Last Closed: 2019-02-11 14:00:34 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 10 Satoe Imaishi 2018-08-23 12:06:12 UTC
https://github.com/ManageIQ/manageiq/pull/17892

Comment 11 Jaroslav Henner 2018-10-18 12:19:38 UTC
$ cat /tmp/data
{ "server": { "name": "Test Name", "zone": "de fault"}}

$ curl -k https://10.8.197.222/api/servers/1/settings -u admin:smartvm --data @/tmp/data -XPATCH
{"error":{"kind":"bad_request","message":"Settings validation failed - server-zone: zone, \"de fault\", invalid. Should be a valid Zone","klass":"Api::BadRequestError"}}%

It seems like this has been fixed, but I would first like to reproduce this problem.

Comment 12 Jaroslav Henner 2018-10-22 11:48:41 UTC
(In reply to Jaroslav Henner from comment #11)
> $ cat /tmp/data
> { "server": { "name": "Test Name", "zone": "de fault"}}
> 
> $ curl -k https://10.8.197.222/api/servers/1/settings -u admin:smartvm
> --data @/tmp/data -XPATCH
> {"error":{"kind":"bad_request","message":"Settings validation failed -
> server-zone: zone, \"de fault\", invalid. Should be a valid
> Zone","klass":"Api::BadRequestError"}}%
> 
> It seems like this has been fixed, but I would first like to reproduce this
> problem.

In 5.10.0.8 I am allowed to change the zone to something invalid. But it doesn't seem to cause a change in the Web-UI ( I can still see Zone: default there) nor it does seem to cause any problems with CFME connectivity. So I couldn't fully reproduce, but new behaviour (forbiding setting to invalid zone) should prevent the problems, so VERIFIED.


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