← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2077010] [NEW] List image API fail with direct name query if name includes ":" colon

 

Public bug reported:

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

** Affects: glance
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/2077010

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

Status in Glance:
  New

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 manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/2077010/+subscriptions