allow colon ':' in the key of KeyValuePair
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Juniper Openstack | Status tracked in Trunk | |||||
R3.2 |
Fix Committed
|
Medium
|
Sachin Bansal | |||
R4.0 |
Fix Committed
|
Medium
|
Sachin Bansal | |||
R4.1 |
Fix Committed
|
Medium
|
Sachin Bansal | |||
R5.0 |
Fix Committed
|
Medium
|
Sachin Bansal | |||
Trunk |
Fix Committed
|
Medium
|
Sachin Bansal |
Bug Description
When there is colon ':' in the key of KeyValuePair, exception happens in api-server.
The cause is in cfgm_common/
For example, create object VirtualMachine with property annotation with
a key-value pair {'car:honda': '123'}, then the col_name is 'propm:
Then split() results 4 elements and that causes 'too many values to unpack' exception.
The assumption of coding was that there is no ':' in the key string.
Here is a fix to consider.
=======
#1505
if self._is_
- (_, prop_name, _) = col_name.split(':')
+ prop_name = col_name.
=======
affects: | opencontrail → juniperopenstack |
Changed in juniperopenstack: | |
assignee: | nobody → Sachin Bansal (sbansal) |
Changed in juniperopenstack: | |
milestone: | none → r5.1.0 |
tags: | added: config |
Changed in juniperopenstack: | |
importance: | Undecided → Medium |
The proposed fix seems to be fixing it on the wrong end.
If I understand the situation correctly, Contrail is synthesizing a column name that includes user entered data. The user data should be escaped (similar to how user data should be handled to prevent SQL injection) so that characters that would have significance to the code are replaced with escape sequences that do not.