xend: Disallow "/" in domain names

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
This commit is contained in:
Keir Fraser committed 2010-02-03 09:45:02 +00:00
1 parent 3cb68d2b59
commit afea05486c
1 file changed
+2 -2
+2 -2
View File
@@ -3472,7 +3472,7 @@ class XendDomainInfo:
def _checkName(self, name):
"""Check if a vm name is valid. Valid names contain alphabetic
characters, digits, or characters in '_-.:/+'.
characters, digits, or characters in '_-.:+'.
The same name cannot be used for more than one vm at the same time.
@param name: name
@@ -3483,7 +3483,7 @@ class XendDomainInfo:
if name is None or name == '':
raise VmError('Missing VM Name')
if not re.search(r'^[A-Za-z0-9_\-\.\:\/\+]+$', name):
if not re.search(r'^[A-Za-z0-9_\-\.\:\+]+$', name):
raise VmError('Invalid VM Name')
dom = XendDomain.instance().domain_lookup_nr(name)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.