We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Environment details chef server: 12.9.1 OS: Ubuntu 12.04
Description
We ran into this problem upgrading chef-server from 12.2 to 12.9. The helper code in private-chef/libraries/helpers.rb isn't nil-safe:
def self.escape_characters_in_string(string) pattern = /(\'|\"|\.|\*|\/|\-|\\)/ string.gsub(pattern){|match|"\\" + match} end
Steps to reproduce the problem
Modify chef-server.rb to enable LDAP logins using an LDAP server that allows anonymous binds. We set the following parameters:
chef-server.rb
ldap['base_dn'] ldap['host'] ldap['login_attribute'] ldap['tls_enabled']
Run chef-server-ctl reconfigure
chef-server-ctl reconfigure
Expected result
Success
Actual result
The following error is shown, and the reconfigure fails:
Chef::Mixin::Template::TemplateError: Chef::Mixin::Template::TemplateError (undefined method `gsub' for nil:NilClass) on line #88: 86: {timeout, <%= node['private_chef']['ldap']['timeout'] || 60000 %> }, 87: {bind_dn, "<%= node['private_chef']['ldap']['bind_dn'] || "" %>" }, 88: {bind_password, "<%= @helper.escape_characters_in_string(node['private_chef']['ldap']['bind_password']) || "" %>" }, 89: {base_dn, "<%= node['private_chef']['ldap']['base_dn'] || "" %>" }, 90: {group_dn, "<%= node['private_chef']['ldap']['group_dn'] || "" %>" }, /var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/helper.rb:161:in `escape_characters_in_string' /var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/helper.rb:165:in `escape_characters_in_string'
The text was updated successfully, but these errors were encountered:
Fixed in #974 (not yet released, new release coming soon)
Sorry, something went wrong.
Chef 12.10.0 has been released which fixes this issue.
No branches or pull requests
Environment details
chef server: 12.9.1
OS: Ubuntu 12.04
Description
We ran into this problem upgrading chef-server from 12.2 to 12.9. The helper code in private-chef/libraries/helpers.rb isn't nil-safe:
Steps to reproduce the problem
Modify
chef-server.rb
to enable LDAP logins using an LDAP server that allows anonymous binds. We set the following parameters:Run
chef-server-ctl reconfigure
Expected result
Success
Actual result
The following error is shown, and the reconfigure fails:
The text was updated successfully, but these errors were encountered: