Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Data Collector organization parsing regex #5630

Merged
merged 2 commits into from
Dec 16, 2016

Conversation

adamleff
Copy link
Contributor

@adamleff adamleff commented Dec 7, 2016

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

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>
@lamont-granquist
Copy link
Contributor

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...

@adamleff
Copy link
Contributor Author

adamleff commented Dec 7, 2016

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).

@tduffield
Copy link
Contributor

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

@stevendanna
Copy link
Contributor

👍 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>
@btm btm added the Bug label Dec 12, 2016
@adamleff
Copy link
Contributor Author

@chef/client-core I believe I've addressed the initial concern, and Travis is all fixed-up now too.

@adamleff adamleff merged commit a2d18fb into master Dec 16, 2016
@adamleff adamleff deleted the adamleff/ipo-500/fix-data-collector-org-parsing branch December 16, 2016 16:09
@thommay thommay added Type: Bug Does not work as expected. and removed Bug labels Jan 25, 2017
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug Does not work as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants