summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Leff <adam@leff.co>2016-12-07 17:45:40 -0500
committerAdam Leff <adam@leff.co>2016-12-07 17:45:40 -0500
commit51687eee080618778dc34237d4a3326838a750e0 (patch)
tree58b2e7cdb66d74314188da1708d1f5e34fedc691
parent9e77f0401b857b2ba1e4d00d8fa5ebc805050a88 (diff)
downloadchef-adamleff/ipo-500/fix-data-collector-org-parsing.tar.gz
update org name regex to match Chef Server'sadamleff/ipo-500/fix-data-collector-org-parsing
Signed-off-by: Adam Leff <adam@leff.co>
-rw-r--r--lib/chef/data_collector/messages/helpers.rb2
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
#