Unbound regex in config options

Bug #1815763 reported by Jim Rollenhagen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Jim Rollenhagen

Bug Description

Oslo.config uses re.search() to check config values against the allowed regex. This checks if the regex matches anywhere in the string, rather than checking if the entire string matches the regex.

Nova has three config options that appear as if the entire string should match the given regex:
* DEFAULT.instance_usage_audit_period
* cinder.catalog_info
* serial_console.port_range

However, these are not bounded with ^ and $ to ensure the entire string matches.

Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/636627

Changed in nova:
assignee: nobody → Jim Rollenhagen (jim-rollenhagen)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/636627
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=9cb825b0147af3b191ea2989e5187e4afdadcb15
Submitter: Zuul
Branch: master

commit 9cb825b0147af3b191ea2989e5187e4afdadcb15
Author: Jim Rollenhagen <email address hidden>
Date: Wed Feb 13 08:16:45 2019 -0500

    Ensure config regexes match the entire string

    Oslo.config uses re.search() to check config values against the allowed
    regex. This checks if the regex matches anywhere in the string, rather
    than checking if the entire string matches the regex.

    Make sure config options where the entire string should match the given
    regex actually do so.

    Change-Id: I9e30a24a4c0640f282f507d0a96640d3cdefe43c
    Closes-Bug: #1815763

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 19.0.0.0rc1

This issue was fixed in the openstack/nova 19.0.0.0rc1 release candidate.

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.