Force the first character of VM name to be a letter
Especially don't allow numeric-only name (our deserializer of qubes.xml will convert it to int instead of str...).
This commit is contained in:
parent
8f302bf2bc
commit
41ba079eb8
@ -399,7 +399,7 @@ class QubesVm(object):
|
||||
return False
|
||||
|
||||
def verify_name(self, name):
|
||||
return re.match(r"^[a-zA-Z0-9_-]*$", name) is not None
|
||||
return re.match(r"^[a-zA-Z][a-zA-Z0-9_-]*$", name) is not None
|
||||
|
||||
def pre_rename(self, new_name):
|
||||
# fire hooks
|
||||
|
Loading…
Reference in New Issue
Block a user