Enforce bounds in the GCE Regex

Otherwise we only match on the first part of the string, allowing minion names with "dots" on them.

Fixes #11669
This commit is contained in:
rallytime 2015-09-15 14:02:47 -06:00
parent f5c3f157dd
commit 36555856c7

View file

@ -115,7 +115,7 @@ list_nodes = namespaced_function(list_nodes, globals())
list_nodes_full = namespaced_function(list_nodes_full, globals())
list_nodes_select = namespaced_function(list_nodes_select, globals())
GCE_VM_NAME_REGEX = re.compile(r'(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)')
GCE_VM_NAME_REGEX = re.compile(r'^(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)$')
# Only load in this module if the GCE configurations are in place