diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-01-09 10:50:02 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-01-09 10:50:02 -0800 |
commit | e396dd61939c363f2fe423201d6f2d590d09c5a4 (patch) | |
tree | fe9be84a5faee117373e165077b9857fe4d75eb6 /lib/chef/config.rb | |
parent | 6c773447d1bd9f89f81ccfbeeb277ae14bdd25e4 (diff) | |
download | chef-e396dd61939c363f2fe423201d6f2d590d09c5a4.tar.gz |
CHEF-4734: Stop enforcing group/owner regular expressions
for unix:
- user/group cannot start with '-', '+' or '~'
- user/group cannot contain ':', ',' or non-space-whitespace or null byte
- we already allowed spaces (i don't know why, but it was tested for)
- this fixes UTF-8 chars as well
windows:
- AD users can be pulled in via LDAP
Diffstat (limited to 'lib/chef/config.rb')
-rw-r--r-- | lib/chef/config.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/config.rb b/lib/chef/config.rb index 5f153c2def..427394d737 100644 --- a/lib/chef/config.rb +++ b/lib/chef/config.rb @@ -497,8 +497,8 @@ class Chef default :fatal_windows_admin_check, false else - default :user_valid_regex, [ /^([-a-zA-Z0-9_.]+[\\@]?[-a-zA-Z0-9_.]*)$/, /^\d+$/ ] - default :group_valid_regex, [ /^([-a-zA-Z0-9_.\\@^ ]+)$/, /^\d+$/ ] + default :user_valid_regex, [ /^[^-+~:,\t\r\n\f\0]+[^:,\t\r\n\f\0]*$/ ] + default :group_valid_regex, [ /^[^-+~:,\t\r\n\f\0]+[^:,\t\r\n\f\0]*$/ ] end # returns a platform specific path to the user home dir |