Fix Data Collector organization parsing regex#5630
Conversation
The regex used to pluck the Chef Server Organization from the chef_server_url config value did not permit hyphens in org names even though they are allowed by Chef Server. This caused org names to get incorrectly truncated when sending the payload to Data Collector servers. Re: Chef bug IPO-500 Signed-off-by: Adam Leff <adam@leff.co>
|
can you just do non-slash characters? that way when someone creates a unicode organization name using CJK characters will just have it work once the server supports them... |
|
I had that initially and changed it back to match what's currently accepted, and didn't want to grab a query string (if for some reason someone had that in their URL - i.e. they had their own proxy service and used query strings to drive behavior). |
|
Here's the regex applied when orgs are created. Maybe we could just use that? https://github.com/chef/chef-server/blob/master/src/chef-mover/apps/oc_chef_authz/src/oc_chef_organization.erl#L193 |
|
👍 on either doing [^/] or @tduffield's suggestion of using the same regex chef-server uses. Would there be any sense of putting this in chef-config which already also knows how to parse out the chef_server_root from the chef_server_url? |
Signed-off-by: Adam Leff <adam@leff.co>
|
@chef/client-core I believe I've addressed the initial concern, and Travis is all fixed-up now too. |
The regex used to pluck the Chef Server Organization from the
chef_server_url config value did not permit hyphens in org names
even though they are allowed by Chef Server. This caused org names
to get incorrectly truncated when sending the payload to Data
Collector servers.
Re: Chef bug IPO-500
Signed-off-by: Adam Leff adam@leff.co