projects
/
invirt/packages/invirt-web.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f586c77
)
More accurate validMachineName (no _, 63 character limit).
author
Eric Price
<ecprice@mit.edu>
Tue, 24 Jun 2008 01:28:19 +0000
(21:28 -0400)
committer
Eric Price
<ecprice@mit.edu>
Tue, 24 Jun 2008 01:28:19 +0000
(21:28 -0400)
svn path=/trunk/packages/sipb-xen-www/; revision=648
code/validation.py
patch
|
blob
|
history
diff --git
a/code/validation.py
b/code/validation.py
index
9b703ad
..
e69559a
100644
(file)
--- a/
code/validation.py
+++ b/
code/validation.py
@@
-135,8
+135,8
@@
def validMachineName(name):
"""Check that name is valid for a machine name"""
if not name:
return False
- charset = string.ascii_letters + string.digits + '-_'
- if name[0] in '-_' or len(name) > 22:
+ charset = string.lowercase + string.digits + '-'
+ if '-' in (name[0], name[-1]) or len(name) > 63:
return False
for x in name:
if x not in charset: