commit 76e3183ead6ac52fc744f51313bc0fd3b5f4d610
Author: Wu Wenxiang <wu.wenxiang@99cloud.net>
Date: Sun Jun 16 04:18:05 2013 +0800
Http 400 when project enabled is not a boolean
Having enabled="true" in json data when updating tenant will produce 500
When updating a project, no type check was performed on the enabled
attribute. Therefore, if enabled value in JSON/XML is not a boolean but
a string, keystone responds with an incorrect Http 500 error code and
the stacktrace.
The change introduces a type validation of the enabled attribute at
identity manager. If the type is not a boolean, keystone now returns an
appropriate Http 400 error code with a message pointing a bad format for
the attribute.
Test cases have been added to file test_backend and test_content_types
for testing the case when enabled attribute is a string or int when
updating project.
Reviewed: https:/ /review. openstack. org/33173 github. com/openstack/ keystone/ commit/ 76e3183ead6ac52 fc744f51313bc0f d3b5f4d610
Committed: http://
Submitter: Jenkins
Branch: master
commit 76e3183ead6ac52 fc744f51313bc0f d3b5f4d610 99cloud. net>
Author: Wu Wenxiang <wu.wenxiang@
Date: Sun Jun 16 04:18:05 2013 +0800
Http 400 when project enabled is not a boolean
Having enabled="true" in json data when updating tenant will produce 500
When updating a project, no type check was performed on the enabled
attribute. Therefore, if enabled value in JSON/XML is not a boolean but
a string, keystone responds with an incorrect Http 500 error code and
the stacktrace.
The change introduces a type validation of the enabled attribute at
identity manager. If the type is not a boolean, keystone now returns an
appropriate Http 400 error code with a message pointing a bad format for
the attribute.
Test cases have been added to file test_backend and test_content_types
for testing the case when enabled attribute is a string or int when
updating project.
Fixes bug #1191384
Change-Id: I86dd7e71d4bac1 e3fd6fcabaa1a21 36a47722e5f