Fix input validation for V2 API server group API extension
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openstack-api-site |
Fix Released
|
Medium
|
Diane Fleming |
Bug Description
https:/
commit d440acf469253c4
Author: Chris Yeoh <email address hidden>
Date: Mon Mar 10 22:20:45 2014 +1030
Fix input validation for V2 API server group API extension
The server group extension create method allows the name
parameter to not be a string. The unittest which tests that an integer
passed as the name fails, but this is due to the policies parameter
missing from the test data, not because the name is invalid.
The internal nova code silently converts floats, integers, etc to strings
and so also does not pick up the validation issue.
The patch adds extra input validation to the API layer to pick up this issue
and also tightens the acceptable values of the string to reject trailing
or leading whitespace which if used can cause confusion for users. It uses
the regexp that the other parts of the API are converging towards to use
as a common acceptable name across the API rather than having different
criteria for names for different extensions.
Also ensures input validation is always properly applied to the policies
parameter and adds test cases. This part is backported from this
https:/
The patch also fixes the broken unittests and adds new ones to test the
tightened criteria for the name parameter.
+DocImpact
Co-authored-by: Gary Kotton <email address hidden>
Closes-Bug: 1290326
Change-Id: I9ddaef8a128ac6
affects: | openstack-manuals → openstack-api-site |
Changed in openstack-api-site: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
milestone: | none → icehouse |
Changed in openstack-api-site: | |
assignee: | nobody → Diane Fleming (diane-fleming) |
status: | Confirmed → In Progress |
Fix proposed to branch: master /review. openstack. org/91884
Review: https:/