[PATCH 2/6] Fix the user/group name regex

David Shea dshea at redhat.com
Sun Sep 8 16:33:19 UTC 2013


---
 pyanaconda/regexes.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyanaconda/regexes.py b/pyanaconda/regexes.py
index 418ce13..44acc0b 100644
--- a/pyanaconda/regexes.py
+++ b/pyanaconda/regexes.py
@@ -41,7 +41,7 @@ GECOS_VALID = re.compile(r'^[^:]*$')
 # both for a maximum total of 32. The empty string is not allowed.
 
 # a base expression without anchors, helpful for building other expressions
-_USERNAME_BASE = r'[a-zA-Z0-9._](a-zA-Z0-9._-]{,30}\$|[a-zA-Z0-9._-]{,31})'
+_USERNAME_BASE = r'[a-zA-Z0-9._](([a-zA-Z0-9._-]{,30}\$)|([a-zA-Z0-9._-]{,31}))'
 
 USERNAME_VALID = re.compile(r'^' + _USERNAME_BASE + '$')
 GROUPNAME_VALID = USERNAME_VALID
-- 
1.8.3.1



More information about the anaconda-patches mailing list