diff options
-rw-r--r-- | lib/chef/data_collector/messages/helpers.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/data_collector/messages/helpers.rb b/lib/chef/data_collector/messages/helpers.rb index a56ea4e829..f42ddaaa4e 100644 --- a/lib/chef/data_collector/messages/helpers.rb +++ b/lib/chef/data_collector/messages/helpers.rb @@ -76,7 +76,7 @@ class Chef def chef_server_organization return "unknown_organization" unless Chef::Config[:chef_server_url] - Chef::Config[:chef_server_url].match(%r{/+organizations/+([\w-]+)}).nil? ? "unknown_organization" : $1 + Chef::Config[:chef_server_url].match(%r{/+organizations/+([a-z0-9][a-z0-9_-]{0,254})}).nil? ? "unknown_organization" : $1 end # |