List image API fail with direct name query if name includes ":" colon

Bug #2077010 reported by Masahito Muroi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
New
Undecided
Unassigned

Bug Description

If image name includes ":" (colon) in its image name, ?name=<image name> query filter doesn't work. The split_filter_op[1] always treats ":" character as a separator, so the ":" in the name is wrongly handled.

How to Reproduce
1. Create an image which name includes ":"
2. Make an API request to List Image API using ?name=<image name> query

$ openstack image list --name "Rocky Linux 9.3:20240315"
BadRequestException: 400: Client Error for url: https://glance.endpoint.com/v2/images?name=Rocky+Linux+9.3%3A20240315, Unable to filter by unknownoperator 'Rocky Linux 9.3'.<br /> <br />

1. https://github.com/openstack/glance/blob/695fcb67c9cd558db7c96d51290e69259a268ecb/glance/common/utils.py#L564

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.